The lecture deals with the following two topics.
\begin{enumerate}[i)]
	\item Commutative Algebra (with connections to Algebraic Geometry).
	\item Homological Algebra (with connection to Algebraic Topology).
	
\end{enumerate}
In Commutative Algebra we study commutative rings (with $1$) $A$ and
\mbox{$A$-modules}.

\section{Noetherian Rings and Modules}
We begin with a revision of a few Definitions.
\begin{definition}[Noetherian]
\index{Noetherian}
A ring $A$ is Noetherian if it satisfies the ascending chain condition (ACC) on
ideals, i.e. any ascending chain of ideals $I_1\subseteq I_2\subseteq \ldots\lhd A$ stabilies.
An $A$-module $M$ is Noetherian if any increasing chain $M_1\subseteq M_2 \subseteq \ldots \subseteq M$ of $A$-submodules stabilizes.
\end{definition}
\begin{Example}
We give examples for Noetherian/non Noetherian rings/modules.
\begin{enumerate}[i)] 
	\item $A=k$ is field.
	\item $A=\ZZ$.
	\item $A=k[x_1,x_2,\ldots$], where $k$ is a field, is not Noetherian.
	\item Consider the unit ball $X=\BB(0,1)$ and an infinite sequence of smaller
	discs $X\supset X_1 \supset X_2 \supset \ldots$. Then  $I_1 \subsetneq I_2 \subsetneq I_3\subsetneq \ldots \lhd C(X)$ defines an non stabilizing ascending chain, where $I_i=\{f\in C(X) : f_{\mid X_i}=0\}$. Thus $C(X)=\{f: X\rightarrow \RR\}$ is not Noetherian.
\end{enumerate}
\end{Example}

\begin{prop}
Let $M$ be an $A$ module. The following are equivalent:
\begin{enumerate}[i)]
	\item M is Noetherian.
	\item Any non-empty set of submodules of $M$ has a maximal element.
	\item Any submodule of $M$ is finitely generated as $A$-module.
\end{enumerate}
\end{prop}
\begin{proof}

\begin{itemize} We proof the Proposition by Ringschluss.
	\item \textbf{i) $\Rightarrow$ ii):}
	
	Given $\emptyset \neq \Sigma=\{M_i : i\in I\}$. If $\Sigma$ has no maximal element, take $M_1\in \Sigma$. Since $M_1$ is not maximal, $\exists M_2 \in \Sigma$ such that $M_1\subsetneq M_2$.
	$\Rightarrow M_1\subsetneq M_2\subsetneq M_3\subsetneq \ldots$ a strictly increasing sequence of submodules of $M$. Contradiction!
\item \textbf{ii) $\Rightarrow$ iii):}

Given a submodule $M_0\subset M$. Let $\Sigma=\{N\subset M_1 : N \text{ submodule }, N is \text{ f.g.}\}$.
$\Sigma$ is nonemepty since $(0) \in M_0$. Let $N_0 \in \Sigma$ be a maximal element.
Claim: $N_0=M_0$. If not, pick any $x \in M_0 \backslash N_0$ and consider $N_0+Ax \supsetneq N_0$.
\item \textbf{ii)$\Rightarrow$ iii):}

Given $M_1\subseteq M_2\subseteq M_3\subseteq \ldots$. Consider $M_{\infty}=\bigcup M_i \subset M$.
Observe: $M_{\infty}$ is a submodlue. So $M_{\infty}=Am_1+\ldots+Am_n, m_i\in M_{\infty}$. Then there exists $i_0$ such that $m_i \in M_{i_0} \forall i$.
So $M_i=M_{\infty}$, i.e. the chain stabilizes.
\end{itemize}
\end{proof}

The class of Noetherian rings and modules is stable under many standard operations. 

\begin{definition}[Exact sequence]
A sequence $0\rightarrow M_1 \stackrel{\alpha}{\rightarrow}M\stackrel{\beta}{\rightarrow}M_2\rightarrow 0$ is exact if
	\begin{enumerate}[i)]
		\item $\alpha$ is injective
		\item $\beta$ is surjective.
		\item $Im~ \alpha=Ker~ \beta$
	\end{enumerate}
	i.e $M/M_1\cong M_2$
\end{definition}	
\begin{prop}
Let $0\rightarrow M_1
\stackrel{\alpha}{\rightarrow}M\stackrel{\beta}{\rightarrow}M_2\rightarrow 0$
be an exact sequence. $M$ is Noetherian $\Leftrightarrow$ $M_1$ and $M_2$ are
Noetherian.
\end{prop}
\begin{Proof} (Proposition)
\begin{enumerate}[i)]
\item[$\Rightarrow$:] Exercise

\item[$\Leftarrow$:] Given $N_1\subseteq N_2\subseteq\ldots \subseteq M$, consider $\alpha^{-1}(N_1)\subseteq \alpha^{-1}(N_2)\subseteq \ldots \subseteq M_1$ and
$\beta(N_1)\subseteq \beta (N_2)\subseteq\ldots \subseteq M_2$.

There exists $k_0$ such that $\alpha^{-1}(N_{k_0})=\alpha^{-1}(N_{k_0+1})=\ldots$ and $\beta(N_{k_0})=\beta(N_{k_0+1})=\ldots$.
Note for each $k$
$$0\rightarrow \alpha^{-1}(N_k)\rightarrow N_k\rightarrow \beta(N_k)\rightarrow 0$$
$$0\rightarrow \alpha^{-1}(N_{k+1})\rightarrow N_{k+1}\rightarrow \beta(N_{k+1})\rightarrow 0$$
$\Rightarrow$ $N_{k_0}=N_{k_0+1}=\ldots$, i.e. the chain stabilizes.
\end{enumerate}
\end{Proof}
\begin{corr}
If $M_1,\ldots,M_n$ are Noetherian, so is $M_1\oplus \ldots \oplus M_n$.
\end{corr}

\begin{corr}
If $A$ is Noetherian and $M$ is finitely generated, then $M$ is Noetherian.
\end{corr}

\begin{corr}
If $A$ is Noetherian, $I \lhd A$, then $A/I$ is Noetherian.
\end{corr}



\subsection{Localization}
\begin{definition}[Multiplicative set]
$S\subset A$ is a multiplicatively closed subset if
		\begin{enumerate}[i)]
			\item $1 \in S$
			\item $x,y \in S \Rightarrow x\cd y \in S$
		\end{enumerate}

\end{definition}
\begin{definition}[Localization]
Let $S\subset A$ be a multiplicatively closed subset of $A$. We define
$$S^{-1}A:=\{a/s : a\in A, s\in S\}/\sim \text{where }$$
$$\frac{a}{s}\sim\frac{b}{t} \Leftrightarrow \exists r \in S,\text{ such that }
r(at-bs)=0$$
\end{definition}
If we define $\sim$ by 
$\frac{a}{s}\sim\frac{b}{t} \Leftrightarrow (at-bs)=0$ the transitivity of the
relation fails.


\begin{Example} We give examples for localizations.

\begin{enumerate}[i)]
	\item $S=\{n\neq 0\}\subset \ZZ$, $S^{-1}\ZZ=\QQ$
	\item $\pp \lhd A$ a prime ideal. $S=A-\pp$. $A_{\pp}:=S^{-1}A$ ($A$ localized at $\pp$).
	When $A=\ZZ \rhd \pp$, then $(\pp)A_{\pp}=\{\frac{m}{n}\in \QQ : \pp\nmid n\}$
	\item
	Given an $A$-module $M$ one can form an $S^{-1}A$-module $S^{-1}M$ by
	setting \mbox{$S^{-1}M:=S^{-1}A\otimes_A M$}. Concretely 
	$$S^{-1}M=\{m/s: m\in	M, s\in S\}/\sim$$
	
	Note there is a natural ring homomorphism $\Phi: A\rightarrow S^{-1}A, a\mapsto a/1$ and $M\rightarrow S^{-1}M, m\mapsto m/1$.
\end{enumerate}

\end{Example}

\begin{prop}
Let $M$ be a Noetherian $A$-module then $S^{-1}M$ is a Noetherian $S^{-1}A$
module.
\end{prop}

\begin{proof}
Given $N_1\subseteq N_2\subseteq \ldots \subseteq S^{-1}M$ $(S^{-1}M$-submodules)
then the chain 
$\Phi_M^{-1}(N_1)\subseteq \Phi_M^{-1}(N_2)\subseteq \ldots \Phi_M^{-1}(S^{-1}M)=M$
of $A$-module stabilizes. 

Thus there exists $k_0$ such that $\forall k\geq k_0 \Phi_M^{-1}(N_{k})=\Phi_M^{-1}(N_{k_0})=Am_1+\ldots Am_n$.
Then for all $k\geq k_0$
$N_k=S^{-1}A \frac{m_1}{1}+\ldots + S^{-1}A\frac{m_n}{1}$
\end{proof}

\begin{thm}[Hilbert Basis Theorem]
If $A$ is Noetherian, then $A[x_1,\ldots,x_n]$ is Noetherian.
\end{thm}

\begin{definition}[$k$-Algebra]
Let $k$ be a field. 
\begin{enumerate}[i)]
\item $A$ is called a $k$-algebra if $k \subset A$.
More generally if $A\stackrel{\Phi}{\rightarrow}B$ is a ring homomorphism say that $B$ is a $A$-algebra (with structure morphism $\Phi$).

\item $A$ is f.g. $k$-algebra if $A$ is generated as a ring by $k$ and some $a_1,\ldots, a_n$.
\item $\Phi:A\rightarrow B$ (a ring homomorphism) is a $k$-algebra homomorphism
if $\Phi_{\mid k}=id$.
\end{enumerate}
\end{definition}

\begin{lemma}
Any f.g. $k$-algebra $A$ is a quotient of $k[x_1,\ldots,x_n]$. In particular
a f.g. $k$-algebra $A$ is Noetherian.
\end{lemma}
\begin{proof}
If $A$ is generated by $k$ and $a_1,\ldots,a_n$ set $\Phi: k[x_1,\ldots,x_n]\rightarrow A, x_i\mapsto a_i$, $p(x_1,\ldots,x_n)\mapsto p(a_1,\ldots,a_n)$.
$\Phi$ is surjective $k$-algebra homomorphism, so $A\cong k[x_1,\ldots,x_n]/I$
\end{proof}

\section{Affine Algebraic Geometry}
\subsection{Algebraic Sets}
Last Time we showed: $\{$Comm. Rings with 1 $\} \supset \{$ Noetherian Ones $\}
\supset \{$ finitely generated $k$-algebras $A$, $k$ a field$\}$ And furthermore any f.g. $k$-Algebra is isomorphic to some modulo ring of polynomials, i.e. $A\cong k[x_1,...,x_n]/I$ for some $n$ and $I$.

We fix a field $k$ and define algebraic sets.
\begin{definition}[$A_k^n$, algebraic sets] The set
	$A_k^n:=\{(a_1,\ldots,a_n) : a_i\in k\}$ is the affine $n$-space over $k$. 

	One may regard $f\in k[x_1,\ldots,x_n]$ as a function on $A^n_k$ by $f: A^n_k\rightarrow k$, \mbox{$(a_1,\ldots,a_n)\mapsto f(a_1,\ldots,a_n)$}

	Subsets of $A_k^n$ defined by the roots of a collection of elements of $k[x_1,\ldots,x_n]$ are called algebraic sets.
\end{definition}

We do not think of $A_k^n$ as a vector space as we do not mark a special point like 0 in it. Every element is 'the same'.
Geometry in general studies shapes; the attribute 'algebraic' Geometry states of what type these shapes are, i.e. they have an algebraic nature. In our case they are roots of a set of polynomials over some field $k$.
\begin{Example}
Examples of algebraic sets.  \textcolor[rgb]{1,0,0}{FIX THIS EXAMPLE}
\begin{enumerate}[i)]
	\item $A^1_k$: algebraic sets are $\emptyset, A^1_k$ and all finite subsets.
	\item $A^2_k$: 
	\item $A^n_k$:
	\item $A^3_k$: conic sections: def. by homogenous deg 2 polynomials (ellipsoids, hyperboloids).
\end{enumerate}
\end{Example}
In the following we study the connection between algebraic subsets of $A_k^n$ and the subsets of $k[x_1,\ldots,x_n]$.
\begin{definition}[Z]
Given a subset $S\subseteq k[x_1,\ldots,x_m]$ set 
$$Z(S)=\{P\in A^n_k : f(\pp)=0 \forall f\in S\}.$$
Consider $$Z: \{ \text{subsets of } k[x_1,\ldots,x_n] \}\rightarrow \{\text{algebraic subsets of }A^n\}$$ as a map.
There is no loss (i.e. the image of $Z$ stays the same) if we restrict the domain to the ideals of $k[x_1,\ldots,x_n]$.
 $$Z: \{\text{ideals of }k[x_1,\ldots,x_n]\}\rightarrow \{\text{algebraic subsets of }A^n\}$$
\end{definition}
\begin{lemma} Properties of $Z$.
\begin{enumerate}[i)]
	\item $Z(0)=A_k^n$, $Z(1)=\emptyset$.
	\item If $S\subseteq T$ then $Z(S)\supseteq Z(T)$.
	\item If $I=$ideal of $k[x,\ldots,x_n]$ generated by $S$ then $Z(S)=Z(I)$.
	\item Intersection: $Z(S)\cap Z(T)=Z(S\cup T)$.
	\item Union: $Z(I)\cup Z(J)=Z(I\cd J)$.
	\item $Z$ is a surjection (by definition).
	\item $Z$ is not injective.
\end{enumerate}
\end{lemma}
\begin{proof}
The first results are obvious and it is easy to show that $Z$ is not injective. In $A^1_k$ we have $\{0\}=Z(x)=Z(x^2)=\ldots=Z(x^k)$. 
In general, if $S=\{f_1,\ldots,f_l\}$ then $Z(S)=Z(\{f^{m_1},\ldots,...,f_l^{m_l}\})$.
\end{proof}

In the following we try to find an 'inverse' to $Z$ by restricting its domain.

Given an algebraic set $V\subset A^n_k$. If we have an ideal $I\lhd
k[x_1,\ldots,x_n]$ such that $Z(I)=V$, then \mbox{$I\subset \{f\in k[x_1,\ldots,x_n]
: f_{\mid V}=0\}=:I(V)$}.
But observe that $I(V) \lhd k[x_1,\ldots,x_n]$ already is an ideal itself. This leads to the Definition.
\begin{definition}[I]

$$I: \{\text{algebraic set of }A_k^n\}\rightarrow \{\text{Ideals of }k[x_1,\ldots,x_n]\}$$
$$I(V):=\{I\subset \{f\in k[x_1,\ldots,x_n] : f_{\mid V}=0\}$$
\end{definition}
\begin{lemma} Properties of $I$
\begin{enumerate}[i)]
\item $I(\emptyset)=k[x_1,\ldots,x_n]$, $I(A_k^n)=(0)$ if $k$ is infinite.
\item If $k$ is finite (e.g. $\FP$) we can consider $A^1_{\FP}$. Then $x^p-x$ vanishes on every point of $A^1_{F_{\pp}}=F_{\pp}.$
	\item  $V\subset W \subset A_k^n$ $\Rightarrow I(V)\supset I(W)$.
	\item $I(V\cup W)=I(V)\cap I(W)$.
	\item If $I\lhd k[x_1,\ldots,x_n], I(Z(I))\supset I$.
	\item If $V\subset A_k^n$, then $Z(I(V))\supset V$.
\end{enumerate}
\end{lemma}
In fact we have the following proposition which is close to $Z$ and $I$ being mutually inverse.

\begin{prop}
If $V\subset A^n_k$ is algebraic, then 

\begin{enumerate}[i)]
	\item $ZI(V)=V$, i.e. $ZIZ=Z$.
	\item $V=Z(J), ZI(V)=V \Leftrightarrow ZIZ(J)=Z(J)$, i.e. $IZI=I$.
\end{enumerate}
\end{prop}

\begin{proof}
We know by the previous Lemma that $ZI(Z(J))\supseteq Z(J)$. Furthermore we have $IZ(J) \supset J \Rightarrow ZIZ(J)\subset Z(J)$ (because the map $Z$ is inclusion reversing) which completes the proof for $ZIZ=Z$.

The proof for $IZI=I$ is similar.
\end{proof}

Indeed we have shown the following Theorem.
\begin{thm}

$$\xymatrix{
\{I \lhd k[x_1,x_n] : I=I(V) \text{ for some alg. }V \} \ar@/^/[d]^{Z} \\
 \ar@/^/[u]^{I} \{V \subset A^n_k: V \text{ algebraic, i.e. }V=Z(I) \text{ for some ideal }I \}
}$$
 
\end{thm}

\begin{definition}[coordinate ring]
Let $V\subset A^n_k$ be algebraic, define the coordinate ring of $V$ as
$k[V]:=k[x_1,\ldots,x_n]/I(V)$.

$k[V]=\{\text{restriction of polynomial functions of }A^n_k \text{ to }V\}$

Let $f\in k[x_1,\ldots,x_n]$. Then 
$$\xymatrix{
f: A_k^n \ar@{->}[r] & k \\
V \ar@{->}[ur]_{f_{\mid V}}
}$$
\end{definition}

\begin{definition}[morphism of algebraic sets]
Given two algebraic sets $V\subset A_k^n$, $W\subset A_k^m$, a function
$\phi: V\rightarrow W$ is a morphism of algebraic sets if there exist polynomials
$\phi_1,\ldots,\phi_m \in k[x_1,\ldots ,x_n]$ such that
$$\phi(a_1,\ldots,a_n)=(\phi_1(a_1,\ldots,a_n),\ldots,\phi_m(a_1,\ldots,a_n))~ \forall (a_1,\ldots,a_n)\in V.$$

Say $\phi$ is an isomorphism if there exists a morphism (!) $\psi: W\rightarrow V$ s.t $\psi \circ\phi=id_V$ and $\phi \circ\psi=id_W$.
\end{definition}

\begin{Remark}
The $\phi_i$ are only well defined modulo $I(V)$, i.e. the $\phi_i$'s should be thought of as elements of $k[V]$.
\end{Remark}

\begin{Example} We give examples for morphisms.
\begin{enumerate}[i)]
\item $\phi: A^1_k\rightarrow x\text{-axis in }A^2_k, x\mapsto (x,0)$ is an isomorphism.
\item $\phi: A^1_k\rightarrow \{y^2=x^3\}, x\mapsto (x^2,x^3)$ is a morphism. Take $k=\RR$. Note that $\phi$ is bijective, but is it an isomorphism? Does there exist a $\psi: W\rightarrow A_k^1$, such that 
\begin{enumerate}[i)]
	\item $\psi$ is a morphism
	\item $\psi\circ \phi=id_{A_k^1}$
	\item $\phi\circ \psi=id_{\{y^2=x^3\}}$
\end{enumerate}
$\psi$, if it exists, is given by $\psi(a,b)=\frac{b}{a}$ (when $a\neq 0$) but this is not defined at $(0,0)\in W$.
So $\psi$ is not given by a polynomial! $\phi$ is not an isomorphism.
\end{enumerate}
\end{Example}
\begin{Remark}
An isomorphism is more than just a bijective morphism. The question is whether the inverse function is also a morphism or not.
\end{Remark}

\textbf{Pullbacks:}

Let $\phi: V\rightarrow W$ be a morphism. Then set 
$$\phi^*: k[W]\rightarrow k[V]=k[x_1,\ldots,x_n],~f\mapsto f\circ \phi$$.

To show that $\phi^*$ is well defined we need to check whether $f\circ \phi \in I(V)$ holds for all  $f \in I(W)$.
It is easy to check that $\phi^*$ is a $k$-alg homomorphism.

Conversely, given a $k$-alg homomorphism $\Phi: k[W]\rightarrow k[V]$, there exists $\phi: V\rightarrow W$, such that $\phi^*=\Phi.$

Indeed, simply consider $x_1+I(W),\ldots,x_m+I(W)$ in $k[W]$ and set 
$$\phi_i=\Phi(x_i+I(W))=\Phi(\overline{x_i}) \in k[V].$$

Define $\phi: V\rightarrow A^m_k, a\mapsto (\phi_1(a),\ldots,\phi_m(a))$.

Check: 
\begin{enumerate}[i)]
\item The image of $\phi$ lies within $W$, (i.e. if $f\in I(W),
f(\phi_1(a),\ldots,\phi_n(a))=0$ for $a\in V$)
\item $\phi^*=\Phi$ (by construction) 
\end{enumerate}

Thus we can conduct the following bijection Theorem.
\begin{thm}
There is a bijection
$$\{\phi: V\rightarrow W \text{ morphisms }\}  \leftrightarrow \{\Phi: k[W]\rightarrow k[V], k\text{-alg homomorphism} \}, \phi \mapsto \phi^*$$
\end{thm}

Recall that there exist polynomials $\phi_1,\ldots,\phi_m$ such that
$$\phi(a_1,\ldots,a_n)=(\phi_1(a_1,\ldots,a_n),\ldots,\phi_m(a_1,\ldots,a_n))$$
The $\phi_i$'s are elements of $k[V]=k[x_1,\ldots,x_n]/I(V)$. Picking representatives $~\phi_i$ of $\phi_i$ in $k[x_1,\ldots,x_m]$
$$\xymatrix{
A^n \ar[r]^{~\Phi=(~\Phi_1,\ldots,~\Phi_m)} & A^m \ar[r]^{~f} & k \\
V \ar[u]_{i}\ar[r]^{\Phi} & W \ar[ur]_{f}
}$$
For $f\in k[W]$, pick $~f \in k[x_1,\ldots,x_n]$ rep $f$
$\Phi^*(f)=~f \circ ~ \Phi \circ id_V=~f \circ ~\Phi \pmod{ I(V)}$
To be sloppy, write $\Phi^*(f)=f\circ \Phi$.

The reverse map is: \textcolor[rgb]{1,0,0}{CHECK THIS WHOLE THING}
Given $k$-alg homomorphism:
$\Phi: k[W] \rightarrow k[V]$
take $x_i\in k[W]$ and set $\phi_i=\Phi (x_i)\in k[V]$.

Let $~\phi_i\in k[x_1,\ldots,x_n]$ be a representation of $\phi_i$. Then $$\phi(a_1,\ldots,a_n)=(~\phi(a_1,\ldots,a_n),\ldots,\phi_m(a_1,~\ldots,a_n))$$
and thus $\phi$ is a morphism $V\rightarrow A^m$ as stated in the diagram
$$\xymatrix{
A^n\ar[r]^{\Phi} & A^M\\
V \ar[ur]_{\phi} \ar@{^(->}[u]
}.$$

Consider
$$\xymatrix{
\Phi^*: k[x_1,\ldots,x_m] \ar[r] \ar[d] & k[V]\\
k[W] \ar[ur]_{\Phi}
}$$
Question: Is this diagramm commutative.

Observe:
$\Phi^*=\Phi\circ p$
Why? Because: $\Phi^*(x_i)=\Phi_i=\Phi(p(x_i))=\Phi(\ol{x_i})$.

This implies: $Im(\Phi)\subset W$.

Why: Given $a\in V$ and $f\in I(W)$, we want to check whether $f(\Phi(a))=0$. Now $f(\Phi(a))=\Phi^*(f)(a)=\Phi(p(f))(a)=0$.


\begin{Example}
$C=y^2=x^3$ in $A^2$
Observe:
Every point on $C$ has form $(a^2,a^3)$ If $(x_0,y_0)\in C$ with $x_0\neq 0$, then $y_0^2=x_0^3$ $\Rightarrow \frac{y_0^2}{x_0}=x_0, (\frac{y_0}{x_0})^3=y_0$

Proof now: $I(C)=(y^2-x^3)$. Take any $f\in k[x,y]$, can write $$f(x,y)=f_0(x)+f_1(x)y+(y^2-x^3)g(x,y)$$
Thus we have $f(a^2,a^3)=0~\forall a\in k$, so $f_0(a^2)+f_1(a^2)a^3=0~\forall a \in k$, i.e. $h(x)=f_0(x^2)+f_1(x^2)x^3$ is a polynomial with coefficients in $k$, such that every element of $k$ is a root.
Since $\# k=\infty$ and $f_0(x^2)$ has stricly even power of $x$ and $f_1(x)x^3$ has only odd powers of $x$ we concluce $f_0=0, f_1=0$.

$\Phi: A^1\rightarrow C$ is a bijective morphism $a\mapsto (a^2,a^3)$.
Claim: $\Phi$ is not an isomorphism.
Look at $\Phi^*:k[C]\rightarrow k[z]$, with $\Phi^*(x)=z^2, \Phi^*(y)=z^3$, so $Im(\Phi^*)=k[z^2,z^3]\subset k[z]$. So $\Phi^*$ is not surjective, because
$z\notin Im(\Phi^*)$. $\Phi^*$ is not an isomorphism.
\end{Example}

Recall that we have bijections $I$ and $Z$.

$$\xymatrix{
\{I\lhd k[x_1,\ldots,x_n] :  I=I(V)\text{ for some algebraic }V\subset A^n\} \ar@/^/[d]^{Z} \\
 \ar@/^/[u]^{I} \{V\subset A^n \text{ algebraic, i.e. }V=Z(I)\text{ for some }I\lhd k[x_1,\ldots,x_n]\}
}$$
This is $IZI=I, ZIZ=Z$.
\subsection{Radical Ideals and Hilbert's Nullstellensatz}


Question: Can one describe the left hand side more intrinsincally?

\begin{Example}
Observe that $I(V)$ has the following property. If $f^n \in I(V)$, i.e. if $f^n\equiv 0$ on $V$, then $f\in I(V)$, i.e. $f=0$ on $V$.
But not every ideal has this property.

In $k[x], (x^2)=I$, take $f=x$, then $f^2\in I$ but $f\notin I.$
\end{Example}

\begin{definition}[Radical]
Given $I\lhd A$ 

\begin{enumerate}[i)]
	\item $Rad(I)=\{f\in A : f^n\in I \text{ for some }n\}\supset I$ (radical of $I$) .
	Check that $Rad(I)\lhd A$.
	\item Say $I$ is radical if $Rad(I)=I$. (So any ideal of the form $I(V)$ is radical).
	\item A prime ideal is radical.
	\item Any intersection of prime ideals is radical.
	\item If $I=(0)$, then $Rad(0)$ is called the nilradical of $A$. Sometimes you just write $Nil(A)$. Say $A$ is reduced if $Nil(A)=0$.
\end{enumerate}
Observe: $Rad(I)/I=Nil(A/I)$. So if $I$ is radical, then $A/I$ is reduced.

\end{definition}


\begin{lemma}
We give a nicer representation of the union of two algebraic sets.


$$Z(I)\cup Z(J)=Z(I\cd J)= Z (I\cap J)$$


\end{lemma}
\begin{proof}
$I\cd J \subset I\cap J$ so certainly $Z(Z\cd J)\supset Z(I\cap J)$.
But note that $(I\cap J)^2 \subset I\cd J$ $\subset I\cap J$ so $Z((I\cap J)^2)\supset Z(I\cd J) \supset Z(I\cap J)$.
Since $Z(I^K)=Z(I)$, equality holds.
\end{proof}

\begin{prop}
Given $I\lhd A$. $Rad(I)=\bigcap\limits_{\mf{p}\supset I, prime} \mf{p}$

Note that $Rad(I)$ does not have to be prime. In general the intersection of
prime ideals might not be prime.
\end{prop}
\begin{proof}
Suffices to prove that $Nil(A)=\bigcap\limits_{\mf{p} prime} \mf{p}$.

\begin{enumerate}[i)]
\item Clear: $Nil(A)\subset \bigcap\limits_{\mf{p} prime} \mf{p}$
\item If $a\notin Nil(A)$, we want to show there exists prime $\mf{p}$ such that $a\notin \mf{p}$. 

Now consider $\Sigma=\{I \lhd : a^n\notin I~\forall n\in \NN\}$.
$\Sigma\neq \emptyset$ since $(0) \in \Sigma$. By Zorn's Lemma (not necessary if $A$ is Noetherian) $\Sigma$ has a maximal element $\mf{p}$.

Claim $\mf{p}$ is prime. If not, there exists $x,y \in A$ such that $xy\in \mf{p}$, but $x\notin p$ and $y\notin \mf{p}$.
Consider  $\mf{p}+(x)\supsetneq \mf{p}$ and $\mf{p}+(y)\supsetneq \mf{p}$. By maximality of $\mf{p}, a^{n_1}\in \mf{p}+(x)$ and $a^{n_2}\in \mf{p}+(y)$ for some $n_1,n_2  \in \NN$.
Then $a^{n_1+n_2} \in (\mf{p}+(x))(p+(y))\subset \mf{p}$
\end{enumerate}
\end{proof}

\begin{Remark}
In general, not every radical ideal $I$ is of the form $I(V)$. For example $k=\RR, (x^2+1)\lhd \RR[x]$ is a maximal ideal $\RR[x]/(x^2+1)\cong \CCC$ and hence is radical. But $(x^2+1)\neq I(V)$ for any algebraic $V\subset \RR$.
The failure of every radical ideal to be of the form $I(V)$ is related to the properties of $\ol{k}\supset k$.
 This suggests to first focus on the case of algebraically closed fields ($k=\ol{k}$.
\end{Remark}

\begin{thm}[Hilbert's Nullstellensatz]
If $k=\ol{k}$, then for any $J \lhd k[x_1,\ldots, x_n]$ IZ(J)=Rad(J).
In particular every radical ideal is of form $I(V)$ for some algebraic $V\subset A^n$.
\end{thm}
The conlusion of this Theorem is that if $k$ is algebraically closed we have the following bijections.

\xymatrix{
\{\text{Alg. set}\} \ar@{<->}[r]& \{\text{Radical ideals of poly. rings}\} \ar@{<->}[r] & \{\text{Reduced f.g. k-alg.}\} \\
V \ar@{<->}[r]& I(V) \ar@{<->}[r] & k[V] \\
}

It is better to consider the categories.

\begin{enumerate}[i)]
	\item \{Alg. set\}
	
	\begin{enumerate}[i)]
		\item Objects: Alg. set in $A^n$, $n\in \NN$
		\item Morphisms: $Hom(V,W)=\{\Phi:V\rightarrow W : \phi morphism\}$
	\end{enumerate}
	\item $\{\text{f.g. reduced k-algebras}\}$
	

\end{enumerate}
Then we have an equivalence of categories (contravariant).

$$\xymatrix{
\{\text{Algebraic sets}\} \ar@{<->}[r]^{F} & \{\text{f.g. red. $k$-algebras} \} \\
V \ar@{<->}[r]^{F} & \k[V]
}$$
$\Phi: V\rightarrow W \mapsto \Phi^*: k[W]\rightarrow k[V]$.
The basic idea is that everything in f.g. reduced k-algebras can be interpreted as a geometric object and studied with geometry. 
Our goal is to extend this to more than k-algebras. 

Now we want to add some structure on the geometric sets.

\subsection{Zariski Topology}
\begin{definition}[Topology]


If $X$ is a set, a topology on $X$ is a collection
$\Sigma=\{U\}$ of subsets of $X$ (called 'open sets') satisfying the following properties.
\begin{enumerate}[i)]
	\item $\emptyset, X \in \Sigma$
	\item if $U_i (i\in I)$ are elements of $\Sigma$, so is $\bigcup\limits_{i\in I} U_i$
	\item if $U_1,\ldots, U_N \in \Sigma$, $U_1\cap\ldots \cap U_n \in \Sigma$
\end{enumerate}
\end{definition}
You could have worked with $T=\{U^C : U\in \Sigma\}$ 'closed sets' and the axioms change to


\begin{enumerate}[i)]
	\item $\emptyset, X \in T$
	\item arbitary intersection of elements of $T$ lie in $T$
	\item finite union of elements of $T$ lie in $T$.
\end{enumerate}
\begin{definition}[Zariski Topology]
On $A^n$, consider
$T=\{V\subset A^n : V\text{ algebraic}\}$. 
\end{definition}
\begin{proof} We need to proof that $T$ forms a topology.
\begin{enumerate}[i)]
	\item $\emptyset, A^n$ are algebraic
	\item $\bigcap\limits_{i\in I } Z(S_i)=Z(\bigcup\limits_{i\in I} S_i)$
	\item $\bigcup\limits_{i=1}^nZ(I_i)=Z(I_1\cap\ldots\cap I_n)$
\end{enumerate}
\end{proof}
This endows $A_k^n$ with the Zariski topology with algebraic sets as closed
subsets. This topology is not Hausdorff (given two points $a,b$ one can find
two open set (one containing $a$, and one containing $b$) that do not intersect). 
In Zariski topology we do not have enough open sets for a Hausdorff topology.
Open sets are basically sets that (in $A^1$ with $\RR$ that just omit a finite number of points).

We can define a topology on any subset $V\subset A^n$ by restriction of the
Zariski topology.
$$T=\{W\subset V : W \text{ algebraic }\}=\{V \cap C : C\subset A^n \text{ algebraic} \}$$ 
defines a topology on $V$.

\begin{definition}[Continuous maps]
$f:V\rightarrow W$ is continuous if $f^{-1}(O)$ is open for all open sets
$O\subset W$.
\end{definition}
One just needs the definition to prove the following.
\begin{prop}
If $\Phi: V\rightarrow W$ is a morphism of algebraic sets, then $\Phi$ is
continuous.
\end{prop}


\begin{center}
\textbf{Lecture 27/01/2012}
\end{center}


\textbf{Last time:}
$$\xymatrix{
\{\text{algebraic sets $V\subset A^n_k$} \} \ar@/^/[d]^{I}\\
\{\text{certain radical ideals of $k[x_1,\ldots,x_n]$} \ar@/^/[u]^{Z}\}
}$$
When $k=\ol{k}$ delete 'certain'. This fact is contained in Hilbert's
Nullstellensatz. If one fixes $V$ we get

$$\xymatrix{
\{\text{algebraic sets $W\subset V$}\} \ar@{<->}[d]\\
\{\text{certain radical ideals of $k[V]$}\}
}$$

We introduced the Zariski topology on algebraic sets which gives the following
connection.

$$ \xymatrix{
\{\text{closed subsets of $V$}\} \ar@{<->}[d]\\
\{\text{algebraic subsets of $V$}\}
} $$
We define principal open sets which form a base of the Zariski topology.
\begin{definition}[Principal open]
Let $f\in k[V]$ be a polynomial. Set  
$$ U_f=\{x\in V \mid f(x)\neq 0\}$$ 
Any set $U_f$ obtained that way is called a principal open set.
\end{definition}

\begin{lemma}
Given any open $U\subset V$, there exist $f_1,\ldots,f_r\in k[V]$, such that \mbox{$U=U_{f_1}\cup \ldots \cup U_{f_r}$}. So principal open sets form a base of Zariski topology.
\end{lemma}
\begin{proof}
$V\backslash U=Z(f_1,\ldots,f_r)$ $\Rightarrow U=U_{f_1}\cup\ldots\cup U_{f_r}$
\end{proof}
\begin{Remark}
A priori, a Zariski open set is not an algebraic set. But one can endow a principal open $U_f$ with the structure of an open algebraic set as follows.

Consider $V\subset A^{n+1}_k$ such that \mbox{$V=\{(x_1,\ldots,x_n,x_{n+1}) \mid x_{n+1}\cd f(x_1,\ldots,x_n)=1\}$}
Now we have a bijection (not a morphism)
$$U_f\longrightarrow V, (x_1,\ldots,x_n)\mapsto
(x_1,\ldots,x_n,\frac{1}{f(x_1,\ldots,x_n)}).$$
\end{Remark}

\begin{Example}
In $M_n(k)=A^{n^2}_k$ consider
$$GL_n(k)=\{B\in M_n(k) \mid det B\neq 0\}.$$
This is a principal open set in $A^{n^2}_k$. By this construction, $GL_n(k)$ is an algebraic set.
\end{Example}

\subsection{Topological Properties and their Algebraic Incarnation}
In this subsection we study the meaning of topological properties if transferred
to the algebraic side of polynomials and vice versa.
\begin{definition}
A topological space $X$ is quasi-compact (if $X$ in addition is Hausdorff you
call it compact) if every open cover has a finite subcover.
\end{definition}
\begin{Remark}

An equivalent definition with closed sets can be formulated. A
topological space $X$ is quasi-compact if for all $\{V_i, i\in I\}$ with $\bigcap\limits_{\in I} V_i=\emptyset$ with $V_i$ closed, there exists a finite $I_0\subset I$ such that $\bigcap\limits_{i\in I_0}V_i=\emptyset$.
\end{Remark}
We can translate this to Algebra. Consider an algebraic set $V$ as
topological space X.
If \mbox{$k[V]=<I(V_i) \mid i\in I>$} then there exists a finite $I_0\subset I$
such that \mbox{$k[V]=<I(V_i) \mid i\in I_0>$}.
	Since this is trivally true ($1$ can be written as an addition of a finite number of elements), we get the following Proposition.

\begin{prop} 
Any algebraic set is quasi-compact.

\end{prop}
\begin{definition}[Affine Variety, reducible]
A topological space $X$ is reducible if $X=X_1\cup X_2, X_i\neq X$ closed.

An algebraic $V$ which is irreducable is called an affine variety.
\end{definition}
\begin{definition}
	A topological space $X$ is disconnected if there are $X_1,X_2$ with $X=X_1 \sqcup X_2$ and $X_i\neq X$ closed. 
\end{definition}
\begin{prop}
Assume $k$ is infinite. An algebraic set $V$ is disconnected iff  $k[V]=I_1\oplus I_2$, with $I_i\properideal k[V]$.
\end{prop}
\begin{Example}
 Consider in $A^1_k$ the algebraic set $V=\{0,1\}$.
  $$k[V]=\frac{k[x]}{x\cd(x-1)}=\frac{(x)}{x(x-1)}\oplus\frac{x-1}{x\cd(x-1)}=\frac{k[x]}{(x)}\times
  \frac{k[x]}{(x-1)}\cong k\times k.$$
	In which case
	$k[V]\stackrel{\sim}{\rightarrow}\frac{k[V]}{I_1}\times\frac{k[V]}{I_2}$.
\end{Example}

\begin{proof}

\begin{itemize}[i)]
\item[$\Rightarrow$] Say $V=V_1 \sqcup V_2$, $V_i\neq V$.
$V_i\subsetneq V \Rightarrow I(V_i)\neq 0$ in $k[V]$. (If $I(V_i)=(0)$ in $k[V]$ then $V_i=ZI(V_i)=Z(0)=V$.
$V=V_1\cup V_2 \Rightarrow (0)=I(V)=I(V_1)\cap I(V_2)$

$V_1\cap V_2=\emptyset \Rightarrow k[V]=I(\emptyset)=I(V_1\cap V_2)=I(V_1)+I(V_2)$
\item[$\Leftarrow$] Say $k[v]=I_1\oplus I_2$, $k[V]=I_1+I_2 \Rightarrow \emptyset=Z(I_1)\cap Z(I_2)$

$I_1\cap I_2=(0) \Rightarrow V=Z(0)=Z(I_1\cap I_2)=Z(I_1)\cup Z(I_2)$
\end{itemize}
\end{proof}


\begin{Example}
In $A^n_k$ we have $Z(f_1f_2)=Z(f_1)\cup Z(f_2), f_i\nmid f_j$. $Z(f_1f_2)$ is reducible but connected.
\end{Example}

\begin{prop}[Irreducible decomposition]

\begin{enumerate}[i)]
	\item $V\subset A^n$ is irreducible $\Leftrightarrow I(V)\lhd k[x_1,\ldots,x_n]$ is prime $\Leftrightarrow k[V]$ is an integral domain.
	\item Irreducible decomposition. There exist unique (up to permutation) $V_1,\ldots,V_r$ with 
	$V=V_1\cup \ldots \cup V_r$, each $V_i$ irreducible closed, $V_i\not \subset
	V_j$ (The $V_i$'s are the irreduicble components of $V$).
	\item Equivalently: $I(V)= \bigcap\limits_{i=1}^r \pp_i$, $\pp_i$ prime.
	$\pp_i\not  \subseteq \pp_j$.
	If $k=\ol{k}$, every radical ideal is uniquely the intersection of finitely many prime ideals.
	Note: We have seen that in any ring $A$, if $I$ is radical $I\bigcap\limits_{\pp\supset I} \pp=\bigcap\limits_{\pp\supset I,\text{ minimal}}\pp$
\end{enumerate}

\end{prop}
\begin{proof}
We proof the different parts seperately.

\begin{enumerate}[i)]
	\item[i)] $\Leftarrow$: $V=V_1\cup V_2$. We already have seen $V\neq V_i\rightarrow I(V_i)\neq 0$ Pick $0\neq f_i\in I(V_i)$. Then $f_1\cd f_2$ vanishes on $V_1\cup V_2=V$. So $f_1\cd f_2=0$ in $k[V]$. 
	
	$\Rightarrow$ If there exists $f_1,f_2$ nonzero in $k[V]$ such that $f_1\cd f_2=0$ then $V=Z(f_1)\cup Z(f_2)$, and $Z(f_i)\neq V$
	
	\item[ii)] To conclude the existence of a decomposition consider $\Sigma=\{V\subset A^n_k \mid V \text{ does not have irred. decomposition}\}$
	$I(\Sigma)=\{I(V)\lhd k[x_1,\ldots,x_n] \mid V\in \Sigma\}$. If $\Sigma\neq \emptyset$, $I(\Sigma)\neq \emptyset$, so $I(\Sigma)$ has a maximal element $I_0=I(V_0)$ (since $k[x_1,\ldots,x_n]$ is Noetherian), so $V_0$ is a minimal element in $\Sigma$.
	$V_0$ is reducable, i.e. $V_0=V_1\cup V_2$, $V_i\subsetneq V_0$. By minimality of $V_0$, $V_1$ and $V_2$ have irreducible decomposition.
	
	Only uniqueness is left to prove. If $V_1\cup\ldots\cup V_r=V=U_1\cup \ldots\cup U_j$ then $V_1=\bigcup\limits_{i=1}^j(V_1\cap U_j)$- Since $V_1$ is irred. $V_1=V_1\cap U_1$, i.e. $V_1\subset U_1$.
	
	Similarily $U_1\subset V_k$ for some $k$. So $V_1\subset V_k$, so $k=1$ and $U_1=V_1$.So $V_2 \cup \ldots u V_r=U_2\cup \ldots \cup U_s$.
\end{enumerate}

\end{proof}


\begin{definition}[Rational functions $k(V)$, transcendence degree of $k(V)$]
If $V$ is an affine variety, then let the function field of $V$ be        
$$k(V)=\{\frac{p}{q} : p,q \in k[V], q\neq 0\}.$$

Elements of $k(V)$ can be thought of as functions defined on open subsets of $V$.

$$ 
\xymatrix{
V \ar[r]^{\frac{p}{q}} & k \\
\begin{rotate}{90}\text{$\subset$}\end{rotate}\\
 U_q=\{x\in V \mid q(x)\neq 0\}\ar[uur]_{\frac{p}{q}}
 }$$
 Set $Dim(V)$=transcendence degree of $k(V)$ =max. cardinality of a set of
 algebraically independent elements of $k(v)$ over $k$.
\end{definition}


\begin{Example} We give examples for the transcendence degree.
\begin{enumerate}[i)]
\item $V=\{(a_1,\ldots,a_n)\}\subset A^n  \}$, $k[V]=k[x_1,\ldots,x_n)/(x_1-a_1,x_2-a_2,\ldots,x_n-a_n)\cong k$. So $k(V)\cong k$ so $Dim V=0$
\item $V=A^n_k$,$k[V]=k[x_1,\ldots,x_n]$ $k(V)=k(x_1,\ldots,x_n)$, $Dim V=n$
\item $V=Z(f)\subseteq A^n, f\in k[x_1,\ldots,x_n]$. We would like $Dim V=n-1$ but this is not easy to check (Requires: Krull's principal ideal theorem). $\rightarrow$ Dimension theorey: give many different equivalent definitions of $Dim V$. One of these is: 
$$Dim V= max \{n: V\supsetneq V_1\supsetneq V_2\supsetneq\ldots \supsetneq V_n, \text{ closed irreducible subsets of $V$}\}.$$
 Translate this to the algebraic side
$$Dim V=max \{n : p_0\subsetneq p_1\subsetneq p_1 \subsetneq \ldots \subsetneq p_n,~ p_i \text{ primitive ideals}\}.$$
\end{enumerate}
\end{Example}

\subsection{Primary Decomposition of Ideals}
In this subsection we proof the existence of a primary decomposition for every
ideal in an Noetherian ring. We have seen that
$$I(V)=\bigcap\limits_{\pp\supset I, \text{minimal}}\pp.$$
In particular, if the field is algebraically closed, i.e. $k=\ol{k}$ holds, then 
we have this decomposition for all radical ideals of $k[x_1,\ldots,x_n]$.)

We want an analog process to the factorization of integers into a product of prime powers. In terms of ideals what will the prime powers be?

\begin{definition}[Primary ideal]
	An ideal $I\properideal A$ is primary if for all $a,b\in A$ with 

	 $ab\in I$ and $a\notin I$ follows that $b^n\in I$ for some $n>0$,
	 i.e.
	 $b\in Rad(I)$.
	
\end{definition}

\begin{prop}
Basic properties of primary ideals are:
\begin{enumerate}[i)]
	\item[i)] Prime ideals are primary.
	\item[ii)] $I \lhd A$ is primary $\Leftrightarrow$ in $A/I$ every zero divisor is nilpotent.
	\item[iii)] $I$ primary $\Rightarrow$ $Rad(I)$ prime. In particular, $Rad(I)$
	is the unique smallest prime with $\pp\supseteq I$.
\end{enumerate}
\end{prop}
\begin{proof}
If $ab\in Rad (I)$ and $a\notin Rad(I) \Rightarrow (ab)^n\in I$ for some $n$ and $a^m\notin I~\forall m$. 
$\Rightarrow (b^n)^k \in I$ for some $k$ 
$\Rightarrow b\in Rad (I)$.
\end{proof}
\begin{Example}
If $A=\ZZ,$ then $I=(n)$ is primary $\Rightarrow I=(p^k)$ or $I=(0)$
because if $n=p_1^{a_1}p_2^{a_2}\ldots$ then $Rad(n)=(p_1p_2\ldots)$
\end{Example}
\begin{definition}[$\pp$-primary ideal]
If $I$ is primary and $\pp=Rad(I)$ say $I$ is $\pp$-primary or $\pp$ is the associated prime of $I$.
\end{definition}

\begin{lemma}

\begin{enumerate}[i)]
	\item[a)] If $I$ is $\pp$-primary and $A$ Noetherian then $p^m\subset I \subset p$ for some $m\in\NN$.
	\item[b)] Finite intersection of $\pp$-primary ideals are $\pp$-primary.
\end{enumerate}
\end{lemma}
\begin{proof}The proof of a) is left as exercise.
\begin{enumerate}[i)]
\item[b)] If $I_1$ and $I_2$ are $\pp$-primary then $Rad(I_1\cap I_2)=Rad(I_1)\cap Rad(I_2)=\pp\cap\pp=\pp$.

If $ab\in I_1\cap I_2$ but $a\notin I_1\cap I_2$,wlog $a\notin I_1$ then $b^n\in I_1$ for some $n$, i.e. $b\in Rad (I_1)=Rad(I_1\cap I_2)$.
\end{enumerate}
\end{proof}
The following questions arise:

\begin{enumerate}[i)]
	\item Does the converse of iii) hold? If $Rad (I)$ is prime, is $I$ primary?
	\item Does the converse of Lemma a) hold? If $\pp^m\subset I \subset
	\pp$ is $I$ primary?
\end{enumerate}

\begin{lemma}

\begin{enumerate}[i)]
	\item[a)] If $Rad (I)$ is maximal, then $I$ is primary. 
	\item[b)] If $\mm^k\subset I \subset \mm$ for $\mm$ maximal, then $I$ is primary. 
\end{enumerate}

\end{lemma}
\begin{proof}

\begin{enumerate}[i)]
	\item [a)] $Rad (I)=\bigcap\limits_{\pp\supset I}\pp$
	
	$\Rightarrow$ $A/I$ has a unique nonzero prime ideal; namely $Rad I/I$.
	
	If $a\in A/I$ is a zero divisor, then $(a)\properideal A/I$. So $(a)\subseteq RadI/I=Nil(A/I)$ so $a$ is nilpotent.
	\item[b)] $\mm^k\subset I \subset \mm$ $\Rightarrow Rad(\mm^k)\subset Rad(I)\subset Rad (\mm)=\mm$.
	Now note: For any prime $\pp$ $Rad(\pp^k)=\pp$.
	$\pp\subseteq Rad(\pp^k)=\bigcap\limits_{q\supset \pp^k}q\subseteq \pp$.
	Now apply $(a)$.
\end{enumerate}

\end{proof}
However the answers to the previous questions are NO in general.

\begin{Example} We give examples that show that the converse of above propositions does not hold in general.

\begin{enumerate}[i)]
	\item $I=(x^2,xy)\lhd k[x,y]$.
	$Rad(I)=(x)$ is prime. $(x)^2\subset I=(x^2,xy)\subset(x)$ But $I$ is not primary. $xy\in I$, $x\notin I$ and $y^k\notin I~\forall k$.
	\item $J=(x^2,y)\lhd k[x,y]$,
	$(x,y)^2\subset(x^2,y)\subset (x,y)$ and $(x,y)$ is maximal. So $(x^2,y)$ is primary.
\item $(x^2,y)$	is not a prime power. If $(x^2,y)=\pp^k$, then $x^2\in \pp^k,y\in \pp^k$ $\Rightarrow x,y\in\pp \Rightarrow (x,y)=\pp$.
But $(x,y)^2\subsetneq (x^2,y)\subsetneq (x,y)$.
\item $A=k[x,y,z]/(xy-z^2)\rhd \pp=(\ol{x},\ol{z})$. Then $A/\pp=k[y]$.

$\pp^2=(\ol{x}^2,\ol{z}^2,\ol{x}\ol{z})=(\ol{x})\cd(\ol{x},\ol{y},\ol{z})$, 

$\pp^2$ is not primary: $\ol{x}\cd\ol{y}\in \pp^2, \ol{x}\notin p^2$ and $\ol{y}^k\notin \pp^2~\forall k$.
\end{enumerate}
\end{Example}
vi) Questions: Is $\pp^m$ necessarily primary? Is a primary $I$ necessarily a prime power?

\begin{definition}[Primary decomposition]
$I\lhd A$ has a primary decomposition if 
$$I=\bigcap\limits_{i=1}^n Q_i, Q_i\text{ primary}. $$

A decomposition is minimal if 
\begin{enumerate}[i)]
	\item $Q_i\supsetneq \bigcap\limits_{j\neq i} Q_j~\forall i$ and
	\item $Rad (Q_i)\neq Rad (Q_j)~\forall i\neq j$.
\end{enumerate}


\end{definition}
If a primary decomposition exists, a minmal one exists.

\begin{thm}[Primary decomposition of ideals in Noetherian rings]
Let $A$ be Noetherian.

\begin{enumerate}[i)]
	\item Any $I\properideal A$ has a primary decomposition.
	\item Let $I=\bigcap\limits_{i=1}^n Q_i=\bigcap\limits_{i=1}^m Q_i'$ be 2 minimal decompositions. Then 
	$$\{Rad(Q_i)\}=\{Rad (Q_i') \}.$$
	The prime ideals $\{Rad (Q_i)\}$ are called associated primes of $I$. The minimal associated primes of $I$ are called isolated primes; the others are called embedded primes.
	
	If $Rad (Q_i)=Rad (Q_i')$ is isolated, then $Q_i=Q_i'$
\end{enumerate}

\end{thm}

\begin{proof}
We split the proof of the decomposition result in several parts and begin with the existence.
\begin{enumerate}[i)]
\item \textbf{Existence:}

	\textbf{Definition: } An ideal $I$ is irreducible if $I=J\cap K \Rightarrow I=J$ or $I=K$.
	
	\textbf{Lemma: }Any $I$ is the intersection of finitely many irreducible ideals.
	
	\textbf{Proposition: }An irreducible ideal is primary.
	
	\textbf{Proof: }Suppose $ab \in I$ but $b\notin I$. Want to show $a^n\in I$ for some $n$.
	Consider $I_n:=\{x\in A \mid a^nx\in I \}\lhd A.$ The $I_n$ form an ascending chain$I_1\subseteq I_2\subseteq\ldots$ and because $A$ is Noetherian it stabilizes $I_n=I_{n+1}$ for some $n$.
	
	Set $J:=(I,a^n), K=(I,b)\supsetneq I$.
	Suppose that $I=J\cap K$ By irreducibility of $I$ it follows that $I=J$, i.e. $a^n\in I$.
	
	We are done if we show the equality $I=J\cap K$. Suppose $y\in J\cap K$, i.e. $y=a^nx+i_1$ with $x\in A$ and $i_1\in I$ and $y=bz+i_2$ with $z\in A$ and $i_2\in I$.
	Then $a\cd y=abz+ai_2\in I \Rightarrow a^{n+1}x\in I$, i.e. $x\in I_{n+1}=I_n$. So $a^n x\in I \Rightarrow y\in I$.

\item \textbf{Uniqueness of $\{Rad (Q_i)\}$}

		Suppose a primary decomposition $I=\bigcap\limits_{i=1}^n Q_i$ exists.
		
		\textbf{Proposition:} $\{Rad (Q_i)\}$ is precisely the set of prime ideals contained in $\{Rad(I:x)\mid x\in A\}$ where $(I:x)=\{a\in A \mid ax\in I\}$.
		
		\textbf{Proof: }
		Observe: $(I:x)=(\bigcap\limits_{i=1}^n Q_i):x=\bigcap\limits_{i=1}^n(Q_i:x)$.

		$Rad(I:x)=\bigcap\limits_{i=1}^n Rad(Q_i:x)$
		
		\textbf{Lemma:} If $x \in Q_i, (Q_i:x)=A$.
		If $x\notin Q_i, (Q_i:x)$ is $\pp_i$-primary ($\pp_i=Rad(Q_i)$).

		Then $Rad(I:x)=\bigcap\limits_{i=1}^n Rad(Q_i:x)=\bigcap\limits_{x\notin Q_i}\pp_i$

		If $Rad(I:x)$ is prime, then $Rad(I:x)=\pp_{i_0}$ for some $i_0$ (since intersection of 2 primes which do not contain each other is not prime).

		Conversely for each $i$, we want to find an $x_i\in A$ such that $Rad(I:x_i)=\pp_i$. Pick $x_i\notin Q_i$ but $x_i\in \bigcap\limits_{j\neq i} Q_i$. Note that $Q_i\not\supset \bigcap\limits_{j\neq i}Q_j$. 	Then \mbox{$Rad(I:x_i)=\bigcap\limits_{x_i \notin Q_j}\pp_j=\pp_i$}.
\end{enumerate}
\end{proof}



\begin{Example}
Let $I:=(x^2,xy)\lhd k[x,y]$. Then $I=(x)\cap (x,y)^2=(x)\cap (x^2,y)$.
For the radicals we have $Rad(x)=(x)$ and $Rad((x,y)^2)=(x,y)=Rad(x^2,y)$. 
The associated primes are $=\{(x),(x,y)\}$, where $(x)$ is isolated and $(x,y)$ is embedded.
Furthermore $V(I)\subset A^2_k$ is the $y$-axis.

Assume we have $I=Q_1\cap Q_2$, $I\subset Q_i\subset \pp_i$, then $V(I)\supset V(Q_i)=V(\pp_i)$.
Given $I\lhd k[x_1,\ldots,x_n]$ with $I=\bigcap\limits_{i=1}^n Q_i$ and
$V(I)\subset A^n$. Set $\pp_i=Rad(Q_i)$.
The irreducible components of $V(I)$ are $V(Q_i)=V(\pp_i)$ for $\pp_i$ isolated.

For other $Q_i$'s or $\pp_i$'s, one has $\pp_i\supset \pp_{i_0}$ so
$V(\pp_i)\subset V(\pp_{i_0})$.
\end{Example}


\begin{center}
\textbf{LECTURE 03.02.2012}
\end{center}


\begin{corr}
Let $I\properideal A$ be a proper ideal.

\begin{enumerate}[i)]
	\item $\pp\supseteq I \Leftrightarrow \pp$ contains an isolated prime of $I$.
	In particular 
			$$\{\text{isolated prime of $I$}\}=\{\text{min $\pp\supseteq I$}\}$$
	\item $Rad(I)=\bigcap\limits_{\text{isolated } \pp}\pp$
	\item there exist primes $\pp_1,\ldots,\pp_n$ (not neccessarily distinct) such that $I\supset \pp_1\cdots \pp_n$
\end{enumerate}
\end{corr}
\begin{proof}
We prove the parts seperately.
\begin{enumerate}[i)]
	\item $\Rightarrow$: Say $I=\bigcap Q_i$, $\pp\supseteq I=\bigcap Q_i$. 
	
	Claim $\pp\supseteq Q_{i_0}$ for some $i_0$.
	If not, then for each $i$, may pick $x_i\in Q_i\backslash \pp$. Then $x_1\cdots x_m\in Q_1\cdots Q_m\subset Q_1\cap\ldots\cap Q_m=I\supset \pp$. A contradiction.
	if $\pp\supseteq Q_{i_0}$, then $\pp=rad(\pp)\supseteq Rad(Q_{i_0}=\pp_{i_0}$
	
	$\Leftarrow$: $\pp\supseteq p_{i_0}\supseteq \sum\limits_{i_0}\supseteq I$. Now if $\pp$ is an isolated prime, then $\pp\supseteq I$. If there exists $\sigma$ such that $\pp\supseteq \sigma\supseteq I$, then $\pp\supseteq \sigma\supseteq $ an isolated prime $\pp'$. So $\pp=\sigma=\pp'$. Conversely...
	\item $Rad I=\bigcap\limits_{p\supseteq I} \pp=\bigcap\limits_{\pp\supseteq I, min}\pp=\bigcap\limits_{\pp\text{ isolated}}\pp$
	\item There exists $m$ such that $(\bigcap\limits_{\pp \text{ isolated}}\pp)^m=(Rad(I))^m\subseteq I.~p_1\cdots p_r \subseteq p_1\cap\ldots\cap p_r$. Thus we have $(\bigcap\limits_{\pp\text{ isolated}}\pp)^m\supseteq p_1^m\cdots p_r^m$
\end{enumerate}
\end{proof}
\subsection{Integral Extensions, Weak-, Strong Nullstellensatz}
The question of this section deals with the following problem. If $k$
is a finite extension of $\QQ$ (i.e.
$k$ is a number field).
What is the analogue of $\ZZ\subset\QQ$ for $k$? 
\textcolor{red}{Fix this}
$$Q_k=\{x\in k \mid x\text{ satisfies a monic polynomial with coefficients in
}\ZZ \}$$
\begin{definition}[Integral]
If $R\subseteq S$

\begin{enumerate}[i)]
	\item Say $s\in S$ is integral over $R$ if $s$ satisfies a monic polynomial with coefficients in $R$.
	\item $S$ is integral over $R$ if all $s\in S$ are integral over $R$.
	\item The integral closure of $R$ in $S$ is the set of all $s\in S$ integral
	over $R$. If this is equal to $R$, say $R$ is integrally closed in $S$.
	\item If $R$ is an integral domain, $R$ is integrally closed/normal in its
	field of fraction.
	
\end{enumerate}

\end{definition}
\begin{Example} 
\begin{enumerate}[i)] We give examples for integrally closed rings.
   \item $\ZZ$ is integrally closed in $\QQ$.
	\item Same argument shows that any UFD is inegrally closed.
	$O_k$=integral closure of $\ZZ$ in $k$ by definition.
\end{enumerate}
\end{Example}

\begin{lemma}

\begin{enumerate}[i)]
	\item Let $R\subset S \rhd I$. If $S$ is integral over $R$, then $S/I$ is
	integral over $R/(R\cap I)$.
	\item If $D\subset R$ is a multiplically closed set and $S$ is integral over
	$R$, then $D^{-1}S$ is integral over $D^{-1}R$.
\end{enumerate}

\end{lemma}
\begin{proof}

\begin{enumerate}[i)]
	\item Consider $\ol{s}\in S/I$. Then $s^n+a_{n-1}s^{n-1}+\ldots+a_0=0$ in $S$,
	$a_i\in R$. Just reduce $\pmod{I}$.
	\item Given $\frac{s}{d}\in D^{-1}S$. Say $s^n+a_{n-1}s^{n-1}+\ldots+a_0=0, a_i\in R$
	Divide by $d^n$: $(\frac{s}{d})^n+\frac{a_{n-1}}{d}(\frac{s}{d})^{n-1}+\ldots+\frac{a_n}{d^n}=0$.
\end{enumerate}

\end{proof}

\begin{prop}
TFAE
\begin{enumerate}[i)]
	\item $s\in S$ is integral over $R$.
	\item $R[s]$ is a finitely generated $R$-module.
	\item $s$ is contained in some subring $T$, $R\subseteq T \subseteq S$ which is f.g. as $R$-module.
\end{enumerate}

\end{prop}
\begin{proof}

\begin{enumerate}[i)]
	\item $i)\Rightarrow ii)$ If $s^n+a_{n-1}s^{n-1}+\ldots+s_0=0$ then $R[s]$ is spanned by $1,s,s^2,\ldots,s^{n-1}$ as $R$-module.
	\item $ii)\Rightarrow iii)$ is clear. Just take $T=R[s]$.
	\item $iii)\Rightarrow i)$ Say $T=Rv_1+\ldots+Rv_n$. Consider multiplication action of $s$ on $T$. $T\rightarrow T$, $R$-linear, $t\mapsto st$. For each $i$ $sv_i=\sum\limits_j a_{ij}v_j$. If $A=(a_{ij})$, then 
	
	
	$s\left(\begin{array}{c} v_1 \\ \vdots \\ v_n \end{array}\right)=A\left(\begin{array}{c} v_1 \\ \vdots \\ v_n \end{array}\right)$.
	This implies that det(sI-A)=0.
	But \mbox{$p(x)=det(xI-A)$} is a monic polynomial with coefficients in $R$, satisfied by $s$.
\end{enumerate}

\end{proof}

\begin{corr}

\begin{enumerate}[i)]
	\item If $s,t$ are integral over $R$, so are $s\pm t$ and $st$. The integral close of $R$ in $S$ is a subring in $S$.
	\item If $R\subseteq S \subseteq T$ and $S$ is integral over $R$, $T$ is integral over $S$, then $T$ is integral over $R$.
	In particular the integral closure of $R$ is integrally closed in $S$.
\end{enumerate}

\end{corr}
\begin{proof}

\begin{enumerate}[i)]
	\item By prop. $R[s]=Rs_1+\ldots+Rs_m$ and $R[t]=Rt_1+\ldots+Rt_m$. $R[s,t]=\sum\limits_{i,j}R s_i t_j$. Since $s\pm t$ and $st \in R[s,t]$ they are integral over $R$ by proposition.
	\item Take $t\in T$. Say $t^n+s_{n-1}t^{n-1}+\ldots+s_0=0, s_i\in S$. Since $s_i$ are integral over $R$ we have $R[s_i]$ is a f.g. $R$-module. 
	So $R[s_0,\ldots,s_{n-1}]\subseteq S$ is a f.g. $R$-module and $t$ is integral over $R[s_0,\ldots,s_{n-1}]$.
	Hence $R[s_0,\ldots,s_{n-1},t]$ is a f.g. $R$-module and so $t$ is integral over $R$.
\end{enumerate}

\end{proof}

We study the extension and contraction of ideals and in which way both
procedures are 'inverse' to each other.
\begin{definition}[Extension-, Contraction of ideals]
Let $\phi: R\rightarrow S$ be a ring
homomorphism and $I\lhd R$, $J\lhd S$ ideals.

We call $J^c:=\phi^{-1}(J)\lhd R$ the contraction of $J$ to $R$.
$I^e:=\phi(I)S\lhd S$ is called the extension of $I$ to $S$. 
\end{definition} 

\begin{prop}
The following propositions hold
\begin{enumerate}[i)]
	\item $I\subseteq I^{ec}, I_1\subseteq I_2 \Rightarrow I_1^e\subseteq I_2^e$
	\item $J\subseteq J^{ce}, J_1\subseteq J_2 \Rightarrow J_1^c\subseteq J_2^c$
	\item But: $I^e=I^{ece}, J^c=J^{cec}$ 
	\item If $J$ is prime then $J^c$ is prime. But if $I$ is prime, $I^e$ need not
	be prime. Not every prime ideal of $R$ is of the form $J^c$.
\end{enumerate}
\end{prop}
Let $C=\{J^c\mid J\lhd S\}$ and $E=\{I^e\mid I\lhd R\}$. Then we have $C=\{I\mid
I^{ec}=I\}$ and $E=\{J \mid J^{ce}=J\}$ and the maps $e$ and $c$ form a
bijection between $C$ and $E$.





\textbf{
\begin{center}
LECTURE 07.02.2012
\end{center}
}


\begin{prop}
Let $S$ be integral over $R$ and $S$ an integral domain.
Then $R$ is a field if and only if $S$ is a field.
\end{prop}
\begin{proof}

\begin{enumerate}[i)]
	\item[$\Rightarrow$] Take $0 \neq s\in S$. We have: $s^n+a_{n-1}s^{n-1}+\ldots+a_0=0, a_i\in R$, wlog, $a_0\neq 0$
	
	because $R$ is a field we have $s\cd\frac{(s^{n-1}+a_{n-1}s^{n-2}+\ldots+a_1)}{a_0}=1$, i.e. $s$ is invertible in $S$.
	\item[$\Leftarrow$] Take $0\neq r \in R\subset S$, have $r^{-1}\in S$. We want to show that $r^{-1}\in S$ indeed.
	We have $(r^{-1})^n+a_{n-1}(r^{-1})^{n-1}+\ldots+a_0=0, a_i\in R$. Multiply with $r^{n-1}$.
	$\frac{1}{r}=-[a_{n-1}+a_{n-2}r+\ldots+a_0 r^{n-1}]\in R$
	
\end{enumerate}

\end{proof}

\begin{corr}
Let $S$ be integral over $R$ and Q$\lhd S$ be prime. Then $Q$ is maximal
if and only if $Q\cap R$ is maximal. (Note that if $Q$ is prime then $Q\cap R$
is prime.)
\end{corr}
\begin{proof}
$S/Q$ (an I.D.) is integral over $R/(Q\cap R)$. Apply  Proposition.
\end{proof}

\begin{thm}[Noether's Normalization Lemma]
Let $k$ be a field and $A=k[r_1,\ldots,r_m]$ a f.g. $k$-algebra.

Then, for some $0\leq q \leq m$, there exist elements $y_1,\ldots,y_q\in A$,
which are algebraically independent over $k$, such that $A$ is integral over
$k[y_1,\ldots,y_q]$.
\end{thm}

\begin{proof}
\textcolor{red}{MAKE THE PROOF NICE}
By induction on $m$. If $r_1,\ldots, r_m$ are algebraically independent, then we are done (take $y_i=r_i$). 

If not, there is $f(r_1,\ldots,r_m)=0 \in A$ for some $f\in k[x_1,\ldots,x_m]$
$f(\underline{x})=\sum\limits_Ia_I \underline{x^I}$ ($I$ is a multiindex) wlog, regard $f$ as a polynomial in $x_m$ with coefficients in $k[x_1,\ldots,x_{m-1}]$. 

\textbf{The goal is}: Change variables to transform $f$ into a monic polynomial in $x_m$ with coefficients from a $k$-subalgebra of $A$ generated over $k$ by $m-1$ elements.

Let $d=$maximal total degree of the monomials in $f(x_1,\ldots,x_m)$. Set $\alpha_i=(1+d)^i, 1\leq i \leq m-1$ and now set $X_i=x_i-x_,^{\alpha_i}, 1\leq i \leq m-1$.
Let $$g(X_1,\ldots,X_{m-1},x_m)=f(x_1,\ldots,x_m)=f(X_1+x_m^{\alpha_1},\ldots,x_{m-1}+x_m^{\alpha_{m-1}},x_m).$$
Now pick out the terms involving only $x_m$.
From $a_I x^I$, get $$a_I x_m^{i_1\alpha_1+i_2\alpha_2+\ldots +i_{m-1}\alpha_{m-1}+i_m} ~~(*).$$
Since $i_k\leq d$, the exponent is the base $(1+d)$-expansion of an integer. So if $a_I x^I$ and $a_J x^J$ are two different monomials in $f(x)$, then the corresponding terms as in $(*)$ are different from powers of $x_m$

If $N=$ largest power of $x_m$ that occurs as in $(*)$ then $g(X_1,\ldots,X_{m-1}, x_m)=c\cd x_m^N+\sum\limits_{i=0}^{N-1}h_i(\underline{X})x_m^i$, $c\in k$.

Thus if we set $s_i=r_i-r_m^{\alpha_i}$, $1\leq i\leq m-1$ then 
$\frac{1}{c}g(s_1,\ldots,s_{m-1},r_m)=0$

So $r_m$ is integral over $B=k[s_1,\ldots,s_{m-1}]$ (since $\frac{1}{c}g$ is monic as a polynomial in $x_m$ with coefficients in $k[s_1,\ldots,s_{m-1}]$.

So $A=B[r_m]$ is integral over $B$. $B$ is a $k$-algebra with $m-1$ generators. By induction there exist $y_1,\ldots,y_q$, $q\leq m-1$ algebraically independent elements of $B$ such that $B$ is integral over $k[y_1,\ldots,y_q]$. By transitivity of integrality, $A$ is integral over $k[y_1,\ldots,y_q]$.
\end{proof}

\begin{thm}[Weak Nullstellensatz]
Let $k=\ol{k}$ be algebraically closed. $M\lhd k[x_1,\ldots,x_m]$ is maximal
if and only if $M=(x_1-a_1,x_2-a_2,\ldots,x_n-a_n), a_i\in k$.
This means
 $$\{\text{points of }A^n_k\}\leftrightarrow \{\text{Maximal ideals of
 }k[x_1,\ldots,x_n]\}.$$
\end{thm}

\begin{proof}
Given a point $a=(a_1,\ldots,a_n)\in A^n$, we have the evaluation map: 
\mbox{$k[x_1,\ldots,x_n]\rightarrow k, f\mapsto f(a)$} and hence $k[x]/I(a)\cong
k$.
\begin{itemize}
\item[$\Leftarrow$] clear.
\item[$\Rightarrow$] Given $m\lhd k[\ul{x}]$ maximal, set $E=k[\ul{x}]/m$ is
a field.
by Noether, $E$ is integral over $k[y_1,\ldots,y_q]$, $y_i's$ algebraically independent elements of $E$.
By propositoin, $k[y_1,\ldots,y_q]$ is a field, i.e. $q=0$. So $E$ is integral over $k$ and $E$ is algebraic over $k$. Since $k=\ol{k}$, we have $E=k$. i.e. there exists $a_i\in k$ such that $x_i-a_i\in m$, i.e. $(x_1-a_1,\ldots, x_n-a_n)\subset m$, this is maximal, so equality holds.
\end{itemize}
\end{proof}

\begin{thm}[Strong Nullstellensatz]
Let $k=\ol{k}$ be an algebraically closed field and $J\lhd k[x_1,\ldots,x_n]$.
Then $$I(Z(J))=Rad J$$, i.e.
$I$ and $Z$ give bijections as follows $$\xymatrix{
\{\text{Affine algebraic set in }A^n\} \ar@/^/[d]^{I}\\
\{\text{Radical ideals of }k[x_1,\ldots,x_n]\}  \ar@/^/[u]^{Z}
}$$
\end{thm}
\begin{proof}
It is clear that $IZ(J)\supseteq Rad(J)$. 

So say $g\in IZ(J)$ and let $J=(f_1,\ldots,f_r)$. We need to show that $g\in
Rad(J)$.

\textbf{Trick:} Consider the ideal $J'=<f_1,\ldots, f_r,x_{n+1}\cd g -1>\lhd k[x_1,\ldots,x_n,x_{n+1}]$.

\textbf{Claim:} $J'=k[x_1,\ldots,x_{n+1}]$.
We have $(a_1,\ldots,a_n,a_{n+1})\in Z(J')\Leftrightarrow (a_1,\ldots,x_n)\in Z(J)$ and $a_{n+1}\cd g(a_1,\ldots,x_n)=1$. But $a_{n+1}\cd g(a_1,\ldots,x_n)=1$ is never fulfilled and thus it follows that $Z(J')=\emptyset$.

If $J'\neq k[x_1,\ldots, x_{n+1}]$, then there exists max $m\supset J'$, $m=(x_1-a_1,\ldots,x_{n+1}-a_{n+1})$ by weak Nullstellensatz.
$\Rightarrow (a_1,\ldots,a_{n+1})\in Z(J')$. So $J'=k[x_1,\ldots,x_{n+1}]$.

$1=p_1f_1+\ldots+p_nf_n+p_{n+1}(x_{n+1}g-1)$.
Substitute: $x_{n+1}=\frac{1}{g}$ and multiply by  a high power of $g$ $\Rightarrow g^N=q_1(x_1,\ldots,x_n)f_1+\ldots+q_r(x_1,\ldots,x_n)f_r \in J$,$q_i\in k[x_1,\ldots,x_n]$, i.e. $g\in Rad J$.

To be precise:

\begin{itemize}
	\item multiply by a high power of $g$
	\item Reduce modulo $(x_{n+1}g-1),$ i.e. consider $k[x_1,\ldots,x_{n+1}]/(x_{n+1}g-1)$
\end{itemize}

\end{proof}
\textbf{
\begin{center}
Lecture 10.02.2012
\end{center}
}
Last time:

\begin{itemize}
	\item Intoduced "`Integral Extensions"'
	\item Proved:
	 
	 \begin{itemize}
		 \item Noether's Normalization
		\item Hilbert's Nullstellensatz
	 \end{itemize}
	
\end{itemize}

\subsection{Localization and Primary Decomposition}

Let $R$ be a commutative ring and $D\subset R$ a multiplicatively closed set.

Consider $D^{-1}R$ and observe that $D^{-1}R=0 \Leftrightarrow 0\in D
\Leftrightarrow D \text{ contains nilpotent elements} $.

Assume $0\notin D$. If $R$ is an $ID$, then $\frac{r_1}{d_1}\sim \frac{r_2}{d_2} \Leftrightarrow r_1d_2=r_2d_1$

Analogously, if $M$ is an $R$-module we have defined the localization of $M$.
Indeed, $D^{-1}M=D^{-1}R\otimes_R M$


\begin{lemma}
Let $\phi: R\rightarrow
D^{-1}R, r\mapsto \frac{r}{1}$ be the natural map of $R$ in $D^{-1}R$. Note that
$\phi$ is not always injective. We collect properties of $\phi$.

\begin{itemize}
	\item $Ker(\phi)=\{r\in R \mid \exists~ d\in D$ such that $rd=0\}$. 
	So if $R$ is an integral domain, $\phi$ will be injective.
	\item The map $\phi$ satisfies a universal property:
	$$
	\xymatrix{
	R \ar[r]^{\psi} \ar[d]_{\phi} & S \\
	D^{-1}R \ar[ur]_{\exists ! \phi '}
	}
	$$
	
	$\text{For any } \psi: R\rightarrow S$ such that $\forall d\in D$ $\psi(d)\text{ is
	a unit }$ there exists exactly one $\phi': D^{-1}R\rightarrow S$,
	such that
	$\psi=\phi'\circ \phi$
	
	Furthermore $\phi'(\frac{r}{d})=\psi(r)\psi(d)^{-1} \in S$ holds.
	
	So we have the localization map 
	
	$$\xymatrix{
	\phi: R \ar[r] &  D^{-1}R \\
	I \ar[u]^{\lhd}  \ar[r]  & I^e=<\phi(I)>=D^{-1}I \ar[u]^{\lhd}
}$$
	
	$\phi^{-1}(J)=J^c \leftarrow J$
	 
\end{itemize}

\end{lemma}
Recall the properties of extensions and contractions of ideals.
	

\begin{multicols}{2}
 
\begin{itemize}
		\item $(I^e)^c\supset I$
		\item $(J^c)^e \subset J$
	\end{itemize}
	
	\begin{itemize}
	  
		\item $I^{ece}=I^e$
		\item $J^{cec}=J^c$
	\end{itemize}
\end{multicols}
We collect further properties of extensions and contractions.
\begin{lemma}
Let $e$ and $c$ be as before induced by the 'embedding' of $R$ into $D^{-1}R$.



\begin{enumerate}[i)]
	\item $I^e= D^{-1}R \Leftrightarrow D\cap I\neq \emptyset$
	\item $(I^e)^c=\{r\in R \mid dr\in I \text{ for some } d\in D\}$
	\item $(I_1+I_2)^e=I_1^e+I_2^e$\\
	$(I_1\cap I_2)^e=I_1^e\cap I_2^e$
	\item $(Rad (I))^e=Rad(I^e)$
\end{enumerate}

\end{lemma}

\begin{proof}

\begin{enumerate}[i)]
	\item $I^e=D^{-1}R \Leftrightarrow 1\in I^e=D^{-1}I$, i.e. $1=\frac{i}{d}$ for
	some $i\in I, d\in D$ $\Leftrightarrow_* \exists d'\in D$ such that $d'\cd 1 \in I$,
	i.e. $D\cap I\neq \emptyset$.

$*: \frac{1}{1}=\frac{i}{d} \Leftrightarrow d_0(d-i)=0, d_0i=d_0d\in D$.
	\item $I'\lhd R$

	\begin{itemize}
		\item $I'\subseteq (I^e)^c$:
		
		If $r\in I'$, then $dr\in I$ for some $d\in D$. So $\phi(r)=\frac{dr}{d}\in I^e$
		\item $I'\supset (I^e)^c$: 
		
		Suppose $r\in (I^e)^c$, i.e $\phi(r)\in I^e$. Then $\frac{r}{1}=\phi(r)=\frac{i}{d} \Rightarrow dr\in I, i.e. r\in I'$.
	\end{itemize}
	\item Left as exercise.
	\item 
	
	\begin{itemize}
		\item $(Rad I)^e \subset Rad(I^e)$: 
		
	 If $\frac{r}{d}\in (Rad I)^e$, with $r\in Rad (I), d\in D$. Then $r^n\in I$ for some $n$ $\Rightarrow (\frac{r}{d})^n\in I^e$, i.e. $\frac{r}{d}\in Rad(I^e)$
	\item $(Rad I)^e \supset Rad(I^e)$: Exercise!
	\end{itemize}

\end{enumerate}
\end{proof}

\begin{lemma}
If $J\lhd D^{-1}R$ then $(J^c)^e=J$, which means that every ideal in $D^{-1}R$ is extended.

Furthermore if $J_1\neq J_2$, then $J_1^c\neq J_2^c$.
\end{lemma}

\begin{proof}
We already know that $(J^c)^e \subseteq J$.
For the reverse inclusion given $\frac{a}{d}\in J$ with $a\in R, d\in D$ consider 
$\phi(a)=\frac{a}{1}=(\frac{a}{d}\cd d)\in J$, i.e. $a\in \phi^{-1}(J)=J^c$, so $\frac{a}{d}\in (J^c)^e=D^{-1}J^c$.
\end{proof}

\begin{corr}
We have bijections as follows 
$$
\xymatrix{
\{\pp\lhd R\mid\pp\text{ prime, } \pp\cap D=\emptyset\} \ar@/^/[d]^{e} \\
\{Q\lhd D^{-1}R\mid Q \text{ prime}\} \ar@/^/[u]^{c}
}
$$
\end{corr}

\begin{proof}
If $Q\lhd D^{-1}R$ prime. We know $\phi^{-1}(Q)=Q^c$ is prime in $R$. Since
$(Q^c)^e=Q, Q^c\cap D =\emptyset$.

We need to check if $\pp\lhd R$ prime, then $p^e=D^{-1}p$ is prime in $D^{-1}R$.
So if $\frac{a}{d_1}\cd\frac{b}{d_2}\in D^{-1}p$ then $\exists~ d\in D$, such that $d\cd ab\in p$.
Since $d\notin p$ (we assume $D\cap p=\emptyset$) it follows that $ab\in p$ ($p$ is prime). So $a\in p$, or $b\in p$, i.e. $\frac{a}{d_1}\in
D^{-1}p$ or $\frac{b}{d_2}\in D^{-1}p$. So $p^{e}$ is prime.



$(p^e)^c=\{r\in R \mid dr\in p\text{ for some } d\in D\}=p$.
\end{proof}

\begin{prop}
If $Q$ is a $p$-primary ideal in $R$, then 
\begin{enumerate}[a)]
	\item $p\cap D \neq \emptyset \Rightarrow Q^e=D^{-1}R$.
	\item $p\cap D =\emptyset \Rightarrow Q^e$ is $p^e$ -primary and $(Q^e)^c=Q$.
\end{enumerate}
\end{prop}

\begin{proof}
\begin{enumerate}[a)]
  \item 
Note that $p=Rad(Q)$  and we state that 
$p\cap D\neq \emptyset \Leftrightarrow Q\cap D \neq \emptyset$.

\begin{itemize}
  \item[$(\Leftarrow)$] Clear
  \item[$(\Rightarrow)$] If $x\in p\cap D$ then $x^n\in Q \cap D$ for some $n$, so $Q\cap D\neq \emptyset$.  
\end{itemize}

\item $Rad(Q^e)=Rad(Q)^e=p^e$.

Check that $Q^e$ is primary: Let $\frac{a}{d_1}\frac{b}{d_2}\in Q^e$ but
$\frac{a}{d_1}\notin Q^e$. 
We want to show that $\frac{b}{d_2}\in Rad(Q^e)=p^e$.

So Then $\exists d_0\in D$ such that $d_0 ab\in Q$ but $da\notin Q$ for all $d\in D$. So
$b\in Rad(Q)=p$ (since $Q$ primary).
So $\frac{b}{d_2}\in D^{-1}p=p^e$.

.... $(Q^e)^c=\{r\in R \mid dr\in Q\text{for some } d\in D\}$ But $p\cap
D=\emptyset, d\notin p=Rad(Q)$.So $r \in Q$
\end{enumerate}
\end{proof}

\begin{thm}
Let $R$ be a Noetherian ring and $I=Q_1\cap\ldots \cap Q_n$ a minimal primary decomposition
with $p_i=Rad(Q_i)$.

WLOG $p_i\cap D =\emptyset$ for $1\leq i\leq t$ and $p_i\cap D \neq \emptyset$
for $i>t$.
\begin{enumerate}[i)]
	\item $I^e=D^{-1}I=Q_i^e \cap \ldots \cap Q_t^e$ is a mininmal primary
	decomposition. (only the minimality is in question) and $(I^e)^c=Q_1\cap
	\ldots\cap Q_t$ is a minimal primary decomposition.
	\item The set $\{Q_i \mid Rad(Q_i)=p_i$ is an isolated prime $\}$ is uniquely determined by $I$.
\end{enumerate}

\end{thm}

\begin{proof}
\begin{enumerate}[ii)]
  \item 

Let $p$ be isolated. Take $D=R\backslash p$ which is multiplicatively closed because $p$ is prime.

Now localize $I=Q_1\cap\ldots \cap Q_n$ at $D$.

Note that $p_i\cap D=\emptyset \Leftrightarrow p_i=p$.

So in $D^{-1}R$, $I^e=D^{-1}I=D^{-1}Q=Q^e$ ($Rad (Q)=p$).
So \mbox{$(I^e)^c=(Q^e)^c=Q$}, i.e. $Q$ is completetly determined by $p$ and $I$.

\end{enumerate}

\end{proof}
We collect the Definition used in the last proof.
\begin{definition}[localization $R_{\pp}$]
Let $p\lhd R$ be prime. Define $D=R\backslash p$. Then we denote $R_{\pp}:=D^{-1}R$.
\end{definition}

\begin{definition}[Local ring]
A local ring is a ring with exactly one unique maximal ideal.
\end{definition}

\begin{prop} TFAE
\begin{itemize}
\item $R$ is local.
\item $\{x \in R \mid x\text{ is not a unit}\}$ is an ideal.
\item $\exists$ a maximal ideal $M$ such that $1+m$ is a unit $\forall ~m\in M$.
\end{itemize}
\end{prop}
\begin{proof}
\begin{itemize}
\item $ii)\Rightarrow i)$: Clear.
\item $i)\Rightarrow ii)$: Let $M\lhd R$ be the unique maximal. Then for $a\in
R\backslash M$ we have $(a)\subsetneq M$. Hence $(a)=R)$ has to hold which is equivalent to $a$ being a unit. $M=\{x \in R \mid x \text{ is not a unit}\}$

\item $i)\Rightarrow iii)$: If $M\lhd R$ maximal, then $(1+m)\notin M~\forall ~ m\in
M$, so $(1+m)$ is a unit.

\item $iii)\Rightarrow ii)$: Take $a\notin M$. Then $(a,M)=R$. so $1=ab+m$, $b\in
R$, $m\in M$. By iii) $ab$ is a unit. So $a$ is a unit.
\end{itemize}
\end{proof}

Now consider $\phi_{\pp}:R\rightarrow R_{\pp}, r\mapsto \frac{r}{1}$.

\begin{prop}

\begin{itemize}
  	 \item There exist bijections.
	 $$\xymatrix{
	 \{\sigma\lhd R \mid \sigma \text{ prime, } \sigma\subset p\} \ar@/^/[d]^{e}
	 & \subset & \{\sigma\lhd R, \sigma\subset p\} \ar@/^/[d]^{e}\\
	 \{Q\lhd R_{\pp}\mid Q \text{ prime}\} \ar@/^/[u]^{c} & \subset  & \{Q\lhd R_{\pp}\}
	 \ar@/^/[u]^{c} }$$
	 \item $R_{\pp}$ is a local ring with maximal ideal $\pp^e=\pp R_{\pp}$ and
	 $(\pp^e)^c=\pp$.
	 
\end{itemize}
\end{prop}
\begin{proof}
Any ideal of $R_{\pp}$ that contains an element not in $\pp$, i.e. contains a
unit, equals $R_{\pp}$. Hence any prime ideal is contained in the ideal $\pp
R_{\pp}$, which is the unique maximal ideal.
\end{proof} 



\begin{definition}[Local property]
A property $P$ of a ring $R$ is local if 
$P$ holds for $R \Leftrightarrow P$ holds for $R_{\pp}$ for all $\pp\lhd R, \pp$
prime.
\end{definition}

\begin{prop}[Being 0 is a local property]
TFAE
for an $R$-module $M$.

\begin{enumerate}[i)]
	\item $M=0$.
	\item $M_{\pp}=0~\forall \pp$ prime.
	\item $M_m=0~\forall m$ maximal.
	
\end{enumerate}


\end{prop}

\begin{proof}
\begin{itemize}
  \item $iii)\Rightarrow i)$
  If $0\neq m \in M$

Consider $Ann(M)=\{r\in R \mid rm=0\}\lhd R$ and $1\notin Ann(M)$.
So there exists a maximal $m_0\supset Ann(M)$. Then $\frac{m}{1} \neq 0 $ in
$M_m$. ($\frac{m}{1}=0 \in M_{m_0} \Leftrightarrow$ exists $r\in R\backslash m_0$
such that $rm=0$, i.e. $Ann(M)\not \subset m_0$).
\end{itemize}
\end{proof}


\begin{prop}
Being Noetherian is \textbf{not} a local property.
\end{prop}

\begin{proof}
Let $k$ be a field. Then $R=k\times k\times\cdots$ is not Noetherian.

Any ideal of $R$ has form $I_S=\Pi_{i\in S}\{0\}\times \Pi_{i\notin S} k$. So
$I_S$ is prime $\Leftrightarrow S=1$.
But for each prime $p$ we have $R_{\pp}=k$ and thus $R_{\pp}$ is Noetherian.
\end{proof}


\begin{prop}[Being normal is a local property]
Let $R$ be an integral domain. TFAE.

\begin{enumerate}[i)]
	\item $R$ normal (i.e. $R$ is integrally closed in its field of fractions).
	\item $R_{\pp}$ normal $\forall \pp$ prime.
	\item $R_m$ normal $\forall m$ maximal.
\end{enumerate}
\end{prop}

\begin{proof}
Let $F=$ be the field of fractions of $R$
$\phi_{\pp}:R\hookrightarrow R_{\pp}\hookrightarrow F$.

\begin{itemize}
	\item $i)\Rightarrow ii)$:
	
	Fix $p$: If $y\in F$ is integral over $R_{\pp}$, then we need to show that $y\in R_{\pp}$. 
	
	Say $y^n+\frac{a_{n-1}}{d_{n-1}}y^{n-1}+\ldots+\frac{a_0}{d_0}=0$ for $a_i\in R, d_i\notin p$.
	Multiply by $(d_0d_1\cdots d_{n-1})^n$:
	Then $y':=y\cd d_0d_1\cdots d_{n-1}\in F$ satisfies a monic polynomial over
	$R$.
	So since $R$ is normal $y' \in R$. So $y=\frac{y}{d_0}\cdots d_{n-1}\in R_{\pp}$.
	
	\item $iii)\Rightarrow i)$:
	
	 Let $y\in F$ be integral over $R$. Since $R\subset
	R_m$ y is integral over $R_m \forall ~m$.
	As $R_m$ is normal $y\in R_m$, so $y\in \bigcap_m R_m$. We are done by applying the following Lemma.

\end{itemize}

\end{proof}

\begin{lemma}
Let $R$ be an integral domain. Then 
$$\bigcap_{m~maximal} R_m=R$$ 
\end{lemma}
\begin{proof}
If $a\in \bigcap_m R_m$ set $I_a=\{r\in R \mid ra\in R\}\lhd R$.
Note that $a\in R\Leftrightarrow 1\in I_a$, i.e. $I_a=R$, if $I_a\neq R$.

If $a\in \bigcap_m R_m$, then we want to show that $I_a=R$. Assume that this is
not the case, then there exists a maximal $m_0$ such that $I_a\subseteq m_0\subsetneq
R$.
Then $a\notin R_{m_0}$, a contradiction.
Indeed if $a\in R_{m_0}$ then $a=\frac{r}{d}$ with $d\notin m_0$. So $d\in
I_a\backslash m_0$ contradicting $I_a\subseteq m_0$
\end{proof}
\begin{center}
\textbf{LECTURE 21.02.2012}
\end{center}
\begin{corr}
Let $R\subseteq S$ and $S$ be integral over $R$. If $\pp\lhd R$ is prime, then
there exists a prime $Q\lhd S$, such that $Q\cap R=\pp$.
\end{corr}
\begin{proof}
	Given $\pp$, consider
	$$\xymatrix{
	R \ar[r]^{\phi_l} \ar[d]_{i}& R_{\pp} \ar[d]_{i_{\pp}} & \text{local}\\
	S\ar[r]^{\phi_S} & S_{\pp} \rhd m & \text{maximal}
	}$$
	As $S_{\pp}$ is integral over $/R_{\pp}$  it follows that $i_{\pp}^{-1}(m)$ is maximal in
	$R_{\pp}$.
	So $i_{\pp}^{-1}(m)=p\cd R_{\pp}$.
	So $\pp=i^{-1}(\phi_S^{-1}(m))$. Define $Q=\phi_S^{-1}(m)\lhd S$ and note that
	$Q$ must be prime. Then $Q\cap R=i^{-1}(Q)=p.$
\end{proof}

\begin{thm}
\begin{enumerate}[i)]
  \item \textbf{(Going Up)}   Let $R\subseteq S$ be integral. Let
  $\pp_1\subseteq p_2\subseteq \ldots\subseteq \pp_n$ be a chain of primes in
  $R$ and $Q_{1}\subseteq\ldots\subseteq Q_m$ a chain of primes in $S$ such that $m<n$
  and $Q_i\cap R=\pp_i$.
  
  Then there exist $Q_m\subseteq Q_{m+1}\subseteq \ldots\subseteq Q_n$
  such that $Q_i\cap R =\pp_i$ for all $1\leq i\leq n$.
  \item \textbf{(Going down)} Let $S$ be an integral domain and $R$ integrally
  closed in $S$. Let $\pp_1\subseteq
  p_2\subseteq \ldots\subseteq \pp_n$ be a chain of primes in $R$ and
  $Q_{n+1}\subseteq\ldots \subseteq Q_m$ a chain of primes in $S$ such that $Q_i\cap
  R=\pp_i$.
  
  Then one can find
  $Q_1\subseteq \ldots\subseteq Q_n\subseteq Q_{n+1}$ of primes such that $Q_i\cap
  R=\pp_i.$
 
\end{enumerate}
\end{thm}




\begin{proof} 
We only proof the first part of the Theorem.
We can reduce the proof to the case that $Q_1\cap R=\pp_1\subseteq \pp_2$.
  Now we want to find a prime $Q_2$ such that $Q_1\subseteq Q_2$ and $Q_2\cap
  R=\pp_2$.
  
  Consider $\ol{p}_2\lhd R/\pp_1\hookrightarrow S/Q_1$ integral. By the previous
  Corollary, there exists a prime $\ol{Q}_2\lhd S/Q_1$ such that $\ol{Q}_2\cap
  R/\pp_1=\ol{\pp}_2$. Then $Q_2\lhd S$ is prime such that $Q_2\cap R=\pp_2$.

\end{proof}
\subsection{Local Ring of Varieties}
Let $V$ be a variety over $k$. We recall the situation of the coordinate ring
$k[V]$ and its embedding into $k(V)$. 
$k[V]$ is an integral domain embedded into $k(V)$. The elements of $k(V)$ are functions defined on open subsets of
$V$.
\begin{Example}
The function $\frac{f}{g}$ is defined on $V_g=\{x\in V \mid g(x)\neq 0\}$.

\textbf{Eg:} Let $V=Z(xz-yw)\subseteq A^4$, i.e $k[V]=k[x,y,z,w]/(xz-yw)$. 

In $k(V)$ $\phi=\frac{\ol{x}}{\ol{y}}$ is defined on $\{\ol{y}\neq 0\}\subseteq
V$.
But $\ol{x}\ol{z}=\ol{y}\ol{w}$ in $k[V]$, so
$\phi=\frac{\ol{x}}{\ol{y}}=\frac{\ol{w}}{\ol{z}}$.
Hence $\phi$ is defined on $\{\ol{z}\neq 0\}\subseteq V$. Thus $\phi$ is defined
on $\{\ol{y}\neq 0\}\cup \{\ol{z}\neq 0\}$.
\end{Example}
\begin{Remark}
If $\phi\in k(V)$ is defined on the whole of $V$ and $k$ is algebraically
closed, then $\phi$ is already in $k[V]$.
\end{Remark}
\begin{proof}
If $\phi$ is defined at $P\in V$, then there exist $f,g\in k[V]$ such that
$\phi=f/g$ with $g(P)\neq 0$, i.e. $g\notin m_{P}=\{f\in k[V] \mid f(P)=0\}$,
i.e. $\phi\in k[V]_{m_{P}}$. As this holds for all $P \in V$ we have $\phi\in
\cap_{P\in V}k[V]_{m_{P}}=k[V]$.
\end{proof}
\begin{definition}[Local Ring of a Variety]
Let $V$ be a variety and $P\in V$ a point of $V$. The local ring of $V$ at $P\in
V$ is 
$$O_{V,P}=\{\Phi:U\rightarrow k \mid U\subseteq V\text{ is open}, P\in U,
\Phi \text{ is defined at U} \}/\sim=k[V]_{m_{P}},$$ 
where $f:U_1\rightarrow k\sim g:U_2\rightarrow k$ if there exists a nonempty
$U\subseteq U_1\cap U_2$ with $f_{\mid U}=g_{\mid U}$.
We also call functions defined with the equivalence relation $\sim$ 
'germs' of functions defined at $P$.

The maximal ideal of $O_{V,P}$ is 
$$m_{V,P}=m_{P}k[V]_{m_{P}}=\{\text{germs of functions vanishing at P}\}.$$
\end{definition}

Observe if $\phi:V\rightarrow W$ is a morphism with $\phi(P)=a$, then
$\phi^*:k[W]\rightarrow k[V]$ induces $\phi^*_{P}: O_{W,\phi(P)}\rightarrow
O_{V,P}$. Moreover $\phi^{*-1}_{\pp}(m_{V,P})=\{\Phi\in O_{w,\phi(P)}\mid
\Phi\circ\phi$ vanishes at $P\}=\{\Phi\in O_{w,\phi(P)}\mid
\Phi$ vanishes at $\phi(P)\}=m_{W,\phi(P)}$

\begin{Remark}
If $\phi: R\rightarrow S$ is a homomorphism of local rings, then
$\phi^{-1}(m_s)\subseteq m_R$ need not be an equality. Such a homomorphism of local rings is called a local homomorphism if
$\phi^{-1}(m_S)=m_R$. Thus $\phi^*_{\pp}:O_{W,\phi(\pp)}\rightarrow O_{V,P}$ is always
a local homomorphism.
\end{Remark}
\subsection{Tangent Spaces and Smoothness}
\begin{definition}[Tangent space]
Let $V\subseteq A^n$ be a variety and $P\in V$ be a point. The tangent space of
$V$ at $P$ is defined by $$T_{P}(V):=\{Z(D_{P}f(x_1,\ldots ,x_n)) \mid f\in I(V)
\},$$ where $D_{P}f(x_1,\ldots,x_n)=\frac{\partial f}{\partial x_1}(P)x_1+\ldots
+ \frac{\partial f}{\partial x_n}(P)x_n$ (this is the linear term of the Taylor
expansion of $f\in I(V)$ at point $P$).
$$f(x_1,\ldots,x_n)=f(P)+\sum \frac{\partial f}{\partial
x_i}(P-x_i)+\text{higher order}.$$

The tangent space can also be described by

$$T_{P}(V)=\{a=(a_1,\ldots,a_n)\in k^n \mid \sum a_i\frac{\partial f}{\partial
x_i}(P)=0\}$$ a vector subspace of $k^n$.

\end{definition}

The following problems occur with the Definition. 
\begin{itemize}
  \item $T_{P}(V)$ appears to depend on the embedding
$V\hookrightarrow A^n$, i.e. if $V\cong V'\hookrightarrow A^n$ is $T_{P}(V)\cong
T_{P}(V')$?

\item Furthermore the Definition of $T_{P}(V)$ uses global defining equations of
$V$. It is not clear that $T_{P}V$ depends only on an open neighbourhood of $P$.
\end{itemize}

The map $D_{\pp}: \sum_{i=1}^na_i\frac{\partial}{\partial x_i}|p :
k[x_1,\ldots,x_n]\rightarrow k$, which evaluates the first linear term of the
taylor series at $P$, is a $k$-linear map and it also satisfies
$$D_{\pp}(f_1\cd f_2)=f_1(\pp)D_{\pp}(f_2)+f_2(\pp)D_{\pp}(f_1) \text{ (Leibnitz
Rule)}.$$

\begin{center}
	\textbf{LECTURE 24.02.2012}
\end{center}
This leads to the definition of a derivative.
\begin{definition}[Derivation, $k$-Derivation]
Let $A$ be any ring and $M$ an $A$-module.
A map $\delta:A\rightarrow M$ is called a derivation of $A$ to $M$ if the
following statements hold.
\begin{itemize}
  \item $\delta(a_1+a_2)=\delta(a_1)+\delta(a_2) $ (Additivity)
  \item $\delta(a_1a_2)=a_1\delta(a_2)+a_2\delta(a_1)$ (Leibnitz rule)
 \end{itemize}
 If $k\hookrightarrow A$ lies in $A$ (i.e. $A$ is a $k$-algebra)
    then call $\delta$ a $k$-derivation if $\delta(k)=0$, in which case $\delta$
    is $k$-linear (by Leibnitz).
    
  \begin{itemize}
    \item $Dev_k(A,M)=\{\text{all $k$-derivations from $A$ to $M$} \}$
  \end{itemize}
\end{definition}

\begin{Example}
$D_{a_,P}:k[x_1,\ldots,x_n]\rightarrow k$ is a $k$-derivation of
$A=k[x_1,\ldots,x_n]$ to $M=A/m_{P}$ where $m_{P}=(x_1-x_1(P),\ldots,x_n-x_n(P))$.

More generally, if $V\subseteq A^n$ is a variety. Consider $k$-derivations of
$k[V]$ at $P\in V$.
$$
\xymatrix{
\delta: k[V]\cong k[x_1,\ldots,x_n]/I(V)\ar[r]   & k[V]/ \ol{m}_{P}\cong k\\
k[x_1,\ldots,x_n] \ar@{.>}[ur]
}
$$

The dotted line is still a $k$-derivation and we get an injection from the set
$\{k\text{-derivations of }k[V]\}$ into $\{k\text{-derivations of
}k[x_1,\ldots,x_k]\text{ at } P\}$.
\end{Example}
In the following we notice that all derivations are of a similar form.
\begin{prop}  Let $k$ be a field, $V$ a variety and $P\in V$ a point of
$V$.
 \begin{enumerate}[i)]
\item Any element of $Dev_{P}(k[x_1,\ldots,x_n])$ is of the form 
$$\sum_ia_i\frac{\partial}{\partial x_i}\mid_{P}$$ for some $a_1,\ldots,a_n\in k$.
\item $T_{P}V\cong Dev_{P}(k[V])$ (natural isomorphism).
In particular, $T_{P} V$ depends only on the ismomorphism class of $V$. 
\end{enumerate}
\end{prop}


\begin{proof} We begin with the proof of the first statement.
\begin{enumerate}[i)]
  \item Let $\delta$ be in $Dev_{P}(k[x_1,\ldots,x_n])$. Note that
  $k[x_1,\ldots,x_n]=k\oplus  m_{P}$.
  As $\delta$ is a $k$-derivative we have $\delta(k)=0$ and by
  Leibnitz rule $\delta(m_{P}^2)=0$ (Just calculate $\delta(x_i-x_i(P)\cd
  (x_j-x_j(P))=0$).
  
 So $\delta$ induces and is determined by the $k$-linear map 
 $\ol{\delta}: m_{P}/m_{P}^2\rightarrow k$.
 Now $m_{P}/m_{P}^2=k\cd \ol{(x_1-x_1(P)} \oplus\ldots\oplus k\cd
 \ol{(x_n-x_n(P))}$, i.e.
 $dim_k(m_{P}/m_{P}^2=n)$.
 Get injection: 
 $$Dev_{P}(k[x_1,\ldots,x_n])\rightarrow
 (m_{P}/m_{P}-^2)^*, \delta\rightarrow \ol{\delta}.$$
 In particular $\frac{\partial}{\partial x_i}_{\mid_{P}} \mapsto l_i$
 
 $l_i\ol{(x_j-x_j(P))}=\delta_{ij}$ so $\{l_i\}$ is a dual basis to
 $\{\ol{x_i-x_i(P)}\}$.
 
 So $Dev_{P}(k[x_1,\ldots,x_n])\cong (m_{P}/m_{P}^2)^*$ and
 $\{\frac{\partial}{\partial x_i}\mid_{P}\}$ is a $k$-basis for
 $Dev_{P}(k[x_1,\ldots,x_n])])$
 and $\delta=\sum_i a_i\frac{\partial}{\partial x_i}\mid_{P}$ for some $a_i$.
 
 
 
 \end{enumerate}
\end{proof}
\begin{Remark}
The argument we used works whenever $A$ is a $k$-algebra and $m\lhd A$ a
 maximal ideal with $A=k\oplus m$ and $A/m=k$.
Then $Dev_k(A,A/m)\stackrel{\sim}{\hookrightarrow} (m/m^2)^*$.
 
 \textbf{Surjectivity:}
 Let $l$ be in $(m/m^2)^*$, i.e. $l:m/m^2\rightarrow k$. 
 Define $\delta_l:A\rightarrow A/m$ by $\delta_l(k)=0, \delta_l(x)=l(\ol{x}),
 x\in m, \ol{x}\in m/m^2$ and show that $\delta_l \in Dev_k(A,A/m)$.
 
 Leibnitz rule is the only condition we have to check. Let $a_i=\lambda_i+m_i$. 
 Then $\delta_l(a_1a_2))
 =\delta_l((\lambda_1+m_1)(\lambda_2+m_2))
 =\delta_l(\lambda_2m_1)+\delta_l(\lambda_1m_2)
 =\lambda_2\delta_l(m_1)+\lambda_1\delta_l(m_2) 
 =\lambda_1 l(m_2)+\lambda_2l(m_1)
 =a_1\delta_l(a_2)+a_2\delta(a_1)$

$k\oplus m_{V,p}=O_{V,p}=k[V]_{\ol{m}_{P}}\rhd m_{V,p}$

$Dev_k(O_{V,p},O_{V,p}/m_{V,p})\cong (m_{V,p}/m_{V,p}^2)^*$

We have seen that 
$T_{P}V=Dev_{P}(k[V])$and $k[V]\hookrightarrow k[V]_{\ol{m}_{P}}=O_{V,P}$. So by
the pullback we have $Dev_k(O_{V,p},k)\rightarrow Dev_{P}(k[V])$ We claim
that this is an isomporphism, i.e. any $\delta \in Dev_{P}(k[V])$ has a unique extension to a
$k$-derivation on $O_{V,p}$.

If $\stackrel{\sim}{\delta}$ is an extension of $\delta$ then for $g\notin
\ol{m}_{P}$ we have $0=\stackrel{\sim}{\delta}(1)=\stackrel{\sim}{\delta}(g\cd
\frac{1}{g})=\frac{1}{g}\stackrel{\sim}{\delta}(g)+g\stackrel{\sim}{\delta}(\frac{1}{g})$.
So $\stackrel{\sim}{\delta}$ is uniquely determined. Hence
$\stackrel{\sim}{\delta}(\frac{1}{g})=-\frac{1}{g^2})\delta(g)$.
For existence we simply 'define'
$\stackrel{\sim}{\delta}(\frac{f}{g})=\frac{g(P)\delta(f)-f(P)\delta(g)}{g(P)^2}$
and check that $\stackrel{\sim}{\delta}$ is well defined and satisfies Leibnitz rule.


\end{Remark}

\begin{thm}
Let $k$ be an algebraically closed field, $V$ a variety over $k$ and $P\in
V$ a point of $V$.

$$T_{P} V\cong (m_{V,p}/m_{V,p}^2)^*.$$
In particular $T_{P}V$ depends only on the isomorphisms class of $V$ and indeed
only on the local ring of $V$ at $P$.

$(m_{V,P}/m_{V,P}^2)$ is a finitely generated module over $O_{V,P}/m_{V,P}\cong
k$, i.e.
it is a finitely generated vectorspace over $k$.

We call $m_{V,P}/m_{V,P}^2$ the cotangent space.
\end{thm}

\begin{definition}[smooth, smoothness, regular local ring]
We call $V$ smooth/non singular at $P\in V$ if 
$$dimT_{P}V=dim V (\text{Krull dimension of }k[V]).$$

$V$ is called smooth if $V$ is smooth at all points $P\in V$.

A local ring $A\rhd m$ is a regular local ring if : 
$$dim_{A/m} m/m^2=\text{Krull dimension of }A.$$

$V$ is smooth at $P$ $\Leftrightarrow  O_{V,p}$ is a regular local ring.


\end{definition}
\begin{Remark}
By 'Dimension Theory' we know that $dim_{A/m} m/m^2 \geq dim A$.
\end{Remark}
\begin{definition}[Singular Points]
If $V$ is \textbf{not} smooth at $P\in V$ then $P$ is called a singular point.
We define the set of singular points

$$Sing(V)=\{P\in V \mid P\text{ is singular}\}.$$

\end{definition}


\begin{lemma}
$Sing(V)$ is a proper closed subset of $V$.
\end{lemma}
\begin{proof}
If $I(V)=<f_1\ldots,f_m>$ then $dim T_{P} V =$ Nullity of ($\frac{\partial
f_j}{\partial x_i} (P)))=n$-rank$((\frac{\partial
f_j}{\partial x_i} (P)))>dim V$.

So 
$Sing(V)=\{P\in V \mid \text{rank}(\frac{\partial f_j}{\partial x_i}(P)
<n-r)=\{P\in V \mid\text{ all }(n-r)\times (n-r)\text{ minors of }(\frac{\partial
f_j}{\partial x_i})\text{ vanish at }P \}$

The point is that $(\frac{\partial
f_j}{\partial x_i})$ are polynomials.

We prove the \textbf{properness} (i.e. $Sing(V)\neq V$) just for the special
case that
$I(V)=(f)$ and $f\in k[x_1,\ldots,x_n]$ is irreducible, i.e. $dim
V=n-1$.

$Sing(V)=\{P\in V\mid \frac{\partial f}{\partial x_i}(P)=0~ \forall i\}$.
If $Sing(V)=V$, then $\frac{\partial f}{\partial x_i}\in I(V)=(f)$. If the
characteristic of $k$ is 0, it is not possible since $deg \frac{\partial
f}{\partial x_i}<deg f$.
If characterisitc of $k$ is $p\neq 0$,
$f(x_1,\ldots,f_n)=g(x_1^p,\ldots,x_n^p)=g(x_1,\ldots,x_n)^p$ which contradics
that $f$ is irreducible.

\end{proof}
\subsection{Presheaves, Sheaves, Structure Sheaves}

\begin{center}
\textbf{LECTURE 28.02.2012}
\end{center}
\begin{itemize}
  \item \textbf{Last Time:} Tangent Space and Derivations.
  \item \textbf{Today: }Sheaf of Rational Functions on Varieties.
  \item \textbf{Recall:} Let $V\subset A^n$ be a variety.

For $U\subset V$ open
$O(U)=\{\text{rational functions regular on }U\}\subseteq k(V)$

If $U=U_f$ for some polynomial $f$, then $O(U)=k[V]_{(f)}$. If $U_1\subseteq
U_2$ are open in $V$ then we have a restriction map
$O(U_2)\rightarrow O(U_1), f\mapsto f_{\mid {U_1}}$.
For $P\in V$ we defined the local ring of $V$ at $P$ denoted by $O_{V,P}$.

$O_{V,P}$ is a local ring with maximal ideal $m_{V,P}=\{(U,f) \mid
f(P)=0\}/\sim$
\end{itemize}



\begin{definition}[Presheaf]
Let $X$ be a topological space. A presheaf $\FF$ of sets, groups or rings on
$X$ consists of the following data 
\begin{itemize}
  \item For each open $U\subset X$, $\FF(U)$ is a set, group or ring.
  \item If $U_1\subseteq U_2$, there is a restriction map
        $\phi_{U_1,U_2}: \FF(U_2)\rightarrow \FF(U_1)$. Whenever
        $U_1\subseteq U_2 \subseteq U_3$
        $$
        \xymatrix{
        \FF(U_3)\ar[r]^{\phi_{U_2,U_3}} \ar@/_/[rr]_{\phi_{U_1,U_3}} & \FF(U_2)
        \ar[r]^{\phi_{U_1,U_2}} & \FF(U_1) }$$
        has to commute.
\end{itemize}
We often denote the restriction of an element $s\in \FF(U_1)$ to $U_2$ by
$s_{\mid U_2}=\phi_{U_2,U_1}(s)$.
\end{definition}

\begin{Example} We give the standard examples for presheaves.
\begin{enumerate}[i)]
  \item 
Let $V\subseteq A^n$ be a variety. We have a presheaf of rings on $V$ defined by
$$O_V(U)=\{\text{rational functions defined on }U\}.$$
If $U_1\subseteq U_2$, $O_V(U_2)\rightarrow O_V(U_1), f\mapsto f\mid_{U_1}$.

\item Let $X$ be a topological space.
$$C(U)=\{\text{continuous functions on }U\}$$
$U_1\subseteq U_2: C(U_2)\rightarrow C(U_1), f\mapsto f\mid_{U_1}$.
\item 
Let $X=\RR^n$.
$$C(U)=\{\text{continuous functions on }U\}$$
$C^{\infty}(U)=\{C^{\infty}\text{ functions on }U\}$.
\item Let $X$ be any topological space and $A$ be a ring. We define the constant
presheaf by 
 \begin{displaymath}
   \FF(U) = \left\{
     \begin{array}{lr}
       A & : U\neq \emptyset\\
       0 & : U=\emptyset
     \end{array}
   \right.
\end{displaymath}
with the trivial restriction map if the codomain is the empty set and the
identity map otherwise.
\end{enumerate}

\end{Example}


We give an alternate formulation of presheafs making use of category theory.

Given $X$,
Let $Top(X)$ be the category with
\begin{itemize}
  \item Objects: Open sets $U\subseteq X$
  \item Morphisms: If $U_1, U_2$ open in X
  \[
  Mor(U_1,U_2) = \left\{
  \begin{array}{l l}
      \emptyset  & \quad \text{if $U_1\not\subseteq U_2$}\\
    \{*\} & \quad \text{if $U_1\subseteq U_2$}\\
  \end{array} \right.
\]
    
  A presheaf $\FF$ on $X$ is a contravariant functor $\FF: Top(X)\rightarrow
  (Comm. Rings)$ with $\FF(U)\rightarrow \FF(\phi)$.
\end{itemize}
\begin{definition}[Sheaf]
Let $X$ be a topological space. A sheaf $\FF$ on $X$ is a presheaf such that the
following gluing condition holds.

If $U=\bigcup_{i\in I} U_i$ is an open cover of an open $U\subseteq X$ and
$s_i\in \FF(U_i)$ s.t. $s_{i\mid U_i\cap U_j}=s_{j \mid U_i\cap U_j}$ then there exists
exactly one $s\in \FF(U)$ s.t. $s_{\mid U_i}=s_i$.
\end{definition}

\begin{Remark}
As stated before a Presheaf on $X$ is a contravariant functor $\FF:
Top(X)\rightarrow \text{(Comm Rings)}$. There is no need to specify that
$\FF(\emptyset)=0$. The Point of this remark is that for a sheaf $\FF$, it is automatic that
$\FF(\emptyset)=0$.
\textbf{Reason:} Let $\{\}$ be an open cover of $\emptyset$. Now we want to show that
$\mid\FF(\emptyset)\mid$ has at most one element. If $s,t\in \FF(\emptyset)$
then for the above open cover, the gluing conditions hold. So by the uniqueness
of the gluing condition, $s=t$. Since $\FF(\emptyset)$ is a ring (or Abelian
group), $\FF(\emptyset)\neq \emptyset$ and it contains exactly one element.
\end{Remark}

\begin{Example} ~
\begin{enumerate}[iv)]
\item  Example iv) need not be a sheaf. Set $A=\ZZ$ and use the restriction
maps as indicated. Consider two disjoint open sets $U_1$ and $U_2$.  Now for
$1\in \FF(U_1)=\ZZ$ and $2\in \FF(U_2)=\ZZ$  we have $1_{\mid U_1\cap
U_2}=0=2_{\mid U_1\cap U_2}$ but there is no $s\in \FF(U_1\cup U_2)=\ZZ$ such
that $s_{\mid U_1}=1$ and $s_{\mid U_2}=2$ because the respective restriction
from $\FF(U_1\cup U_2)$ to $\FF(U_i)$ was set to be the identity.
\item[v)] Constant sheaf with regard to $A$:
$\FF(U)=\{\text{continuous functions from $U$ to }A\}$ (when $A$ is given
discrete topology)
This is a sheaf. If $U$ is connected,  then $\FF(U)=A$
\end{enumerate}
\end{Example}

On a topological space $X$  consider all (pre)sheafs.
\begin{definition}[$Sh(X)$ category of sheaves of rings on $X$]
Given two sheaves $\FF_1$ and $\FF_2$ on $X$ a morphism $\phi: \FF_1\rightarrow
\FF_2$ is a natural transformation of functors,
i.e. for every open $U\subseteq X$ 
$\phi(U): \FF_1(U)\rightarrow \FF_2(U)$ (a ring homomorphisms)
s.t. for all $U\subseteq V$

$$\xymatrix{
F_1(V) \ar[r]^{\phi(V)} \ar[d]^{p_{1,U,V}} & \FF_2(V) \ar[d]^{p_{2,U,V}}\\
\FF_1(U) \ar[r]_{\phi(U)} & \FF_2(U)
}$$
 is commutative.
 
 Set $Sh(X)$ to be the category of sheaves (of rings) on $X$.
\end{definition}
\begin{Example}
Functionality
If $f:X_1\rightarrow X_2$ is a continuous map and $\FF$ is a sheaf on $X_1$
then one obtains naturally a sheaf $f_*\FF$ on $X_2$ by 
for $U\subseteq X_2$ open set
$(f_*\FF)(U)=\FF(f^{-1}(U))$
If $U_1\subseteq U_2$ then $f^{-1}(U_1)\subseteq f^{-1}(U_2)$

$$\xymatrix{
(f_*\FF)(U_2) \ar@{}[r]^{=} \ar[d] & \FF(f^{-1}(U_2)) \ar[d]\\
(f_*\FF)(U_1) \ar@{}[r]^{=} & \FF(f^{-1}(U_1))
}$$

Check the glueing condition.
If $U=\bigcap_{i\in I}U_i \subseteq X_2$ then $f^{-1}(U)=\subseteq _{i\in
I}f^{-1}(U_i)$
If $s_i\in (f_*\FF)(U_i)$ are s.t. 
$s_{i\mid U_i\cap U_j}=s_{j\mid U_i\cap U_j}$ then $s_i\in \FF(f^{-1}(U_i))$
and $s_{i\mid f^{-1}(U_i)\cap f^{-1}(U_j)}=s_{j\mid f^{-1}(U_i)\cap
f^{-1}(U_j)}$

Since $\FF$ is a sheaf there exists $s\in \FF(f^{-1}(U))$ s.t.
$s_{\mid f^{-1}(U_i)}=s_i$
\end{Example}
\begin{definition}[Stalk of a (pre)sheaf $\FF$ at $P\in X$]
If $\FF$ is a (pre)sheaf on $X$ and $P\in X$ then set
$$\FF_{P}=\{(U,s) \mid U \text{ open neighbourhood of } P,~ s\in
\FF(U)\}/\sim,$$ where $(U_1,s_1)\sim (U_2,s_2)$ if 
there exists $U\subseteq U_1\cap U_2$ open neighbourhood of $P$ such that
$s_{1\mid U}=s_{2\mid U}$

$\FF_{P}$ is called the stalk of $\FF$ at $P$.

\end{definition}

\begin{Example}
Let $V\subseteq A^n$ be a variety.
\begin{enumerate}
  \item The sheaf of rational functions on $U$, i.e.
$O_V(U)=\{\text{rational functions definition on }U\}$ is called the structure
sheaf of $V$.
\item  $O_{V,P}=\{\text{germs of rational functions defined at $P$}\}$

 \end{enumerate}
\end{Example}
\begin{center}
\textbf{Lecture 02.03.2012}
\end{center}
\textbf{Last Time:}
$$
\xymatrix{
\text{Algebraic Sets of } A^n_k \ar@{}[r]{~~~~~~~~~~~~~\subseteq}
\ar@{<->}[d]^{k=\ol{k}} & Spaces ? \ar@{<->}[d]\\
\{\text{Reduced f.g. }k\text{-algebra}\} \ar@{}[r]{~~~~~~~~~~~\subseteq}&
\{\text{commutative Rings with }1\} }
$$

Where reduced means that the nil radical is trivial.

What additional features do we have on algebraic sets?
\begin{itemize}
  \item Zariski Topology
  \item Structure sheaf: sheaf of rational functions
\end{itemize}

\textbf{$1^{st}$ Guess:}
$V\subseteq A^n \leftrightarrow k[V]$.
$P\in V \stackrel{\text{Nullstellensatz}}{\leftrightarrow}\text{ maximal ideals
of }k[V] $

\begin{definition}[maxSpec]
Let $R$ be a ring. We define $$maxSpec(R)=\{m\lhd R \mid m \text{ maximal}\}.$$
\end{definition}

\textbf{Problem:} If $\phi: k[W]\rightarrow k[V]$ is a k-algebra homomorphism
then $\phi^*$ gives rise to $\phi: V\rightarrow W$ s.t. if $P\in V
\leftrightarrow m_{P}$ then $\phi(P)\in W \leftrightarrow \phi^{-1}(m_{P})$

For general rings, say $\phi:R\rightarrow S$ inducing $\phi^*: maxSpec
(S)\rightarrow maxSpec(R), \phi^*(M)=\phi^{-1}(m), m\lhd S$.
But in general, we only know that $\phi^{-1}(m)$ is prime and not whether it is
maximal.

Let $\pp\lhd S$ be prime, then $\phi^{-1)}(\pp)\lhd R$ is prime in $R$. This
suggests that we consider instead:
\begin{definition}[Spectrum of $R$]
The spectrum of a ring $R$ is defined by
$$Spec(R)=\{\pp\lhd R \mid\pp\text{ prime}\}.$$
\end{definition}

\begin{Example}
Let $R=k[V]$, $k$ algebraically closed.
$$\xymatrix{
 maxSpec R \ar@{}[r]^{\subseteq} \ar@{<->}[d]& Spec R \ar@{<->}[d]\\
  V=\{\text{points of }V\} \ar@{}[r]^{\supseteq}& \{\text{subvarieties of
  }V\} }$$
\end{Example}

\begin{Example} We give examples for the spectrum of certain rings.
\begin{itemize}
  \item $R=k$ a field, $Spec R=\{*\}$
  \item $R=\ZZ$
  $Spec R=\{(0),(\pp) \mid \pp\text{ primes}\}$
  \item $R=k[x]$. $Spec R\{(0), (f) | f\text{ irreducible}\}$
  \item $Spec R= Spec R/Nil(R), e.g.Spec k[x]/(x^2)=Speck[x]/(x)=\{*\}$
\end{itemize}
\end{Example}

Lets look at the topology.
\begin{definition}[Zariski topology]
Let $R$ be a ring. For $S\subseteq R$  define
$$Z(S)=\bigcap\limits_{f\in S} \{\pp\in Spec R\mid
f(\pp)=f\pmod{\pp}=0\}=\{\pp\in Spec R \mid \pp\supseteq S\}$$ The topology
obtained by the closed sets $T:=\{Z(I) \mid I\lhd R\}$ is denoted as the Zariski topology on $Spec R$.
 
\end{definition} 
Note that $T$ in the previous definition actually defines a topology as we have
 the following properties.
 \begin{itemize}
   \item  $\cap_iZ(I_i)=Z(<I_i>)$
   \item $\bigcup_{i=1}^n Z(I_i)=Z(I_1\cap\ldots\cap I_n)=Z(I_1\cdots I_n)$
   \item $Z(0)=Spec R.$
   \item $Z(R)=\emptyset .$
\end{itemize}

The definition tries to make the function induced by an element $f\in R$ as
close to being continuous as possible. The fields in the image of $f$ vary with
each $x$, do not have a topology defined on them and thus the common definition
of continuity does not make sense.

But all fields contain a zero element and hence the locus of points at which $f$
vanishes should be closed. Furthermore the intersection of closed sets should be closed;
$Z(S)$ is the set of points at which each $f\in S$ vanishes.

\begin{Remark}
In the Zariski topology on $Spec(R)$, a set consisting of only a single point need not be closed.
Actually the 'closed points' are the maximal ideals $maxSpec(R)$.
\end{Remark}

 \begin{Example} Let $I\lhd R=k[V]$. The closed points in $V$ correspond to the
 maximal ideals of $R$ in $Spec R$. Hence the closure of $I$ in $Spec R$ is are
 exactly the points that vanish at $I$, i.e. $Z(I)=\{P\in V | I\text{
 vanishes at }P\}=\{m_P\lhd k[V]\mid m_{P}\supseteq I \text{ and maximal}\}$.
  
 \end{Example}
 




\begin{Example}
If $\pp\in Spec R$, then $\ol{\{\pp\}}=Z(I)$ for some $I\lhd R$ such that
$\pp\supseteq I$. But already $\ol{\{\pp\}}\subset Z(\pp)$. If $I\subseteq \pp$
then $Z(I)\supseteq Z(\pp)\supseteq \ol{\{\pp\}}$.
Hence $\ol{\{\pp\}}=Z(\pp)=\{\sigma \in Spec R | \sigma \supseteq \pp\}$.
\begin{itemize}
  \item $R=\ZZ$. $\ol{\{0\}}=Spec(\ZZ)$, i.e. $\ol{\{0\}}$ is dense in $Spec
  (\ZZ)$, it is called the generic point.
  \item $Spec R \stackrel{\sim}{\leftarrow} Spec R/Nil(R), R\mapsto R/Nil(R)$
\end{itemize}
\end{Example}

Conversely if $Y\subseteq Spec R$ then
$I(Y)=\bigcap_{p\in Y}p\lhd R$ (radical ideal).
$$\xymatrix{\{\text{closed subsets of }Spec R\} \ar@/^/[d]^{I}\\
\{\text{Radical ideals of }R\}  \ar@/^/[u]^{Z}
}$$

\begin{itemize}
  \item $IZ(J)=Rad J$.
  \item $IZI=I$.
  \item $ZIZ=Z$.
\end{itemize}

\textbf{Morphisms:}

If $\phi: R\rightarrow S$, get $\phi^*: Spec S\rightarrow Spec R, \sigma
\mapsto p=\phi^{-1}(\sigma)$. 
$\phi^*$ is continuous with regard to the Zariski topology.
$(\phi^*)^{-1}(Z(I))=Z(<\phi(I)>), I\lhd R$

We have a contravariant functor.

(commuative rings with) $\rightarrow$ (Top Spaces), $R\mapsto Spec R$,
$R\stackrel{\phi}{\rightarrow}\mapsto Spec S \stackrel{\phi^*}{\rightarrow} Spec
R$

\textbf{Structure Sheaf:}
We would like to think of $R$ as the ring of rational functions defined on $Spec
R$. 
If $R=k[V]$ and $f\in R, P\in V$ then $f(P)=f \pmod{ m_{P}} \in R/m_{P}$. Hence
$f\in R$ induces a function on $Spec R$ and in general you may regard $f\in R$
as a function on $Spec R$ via $\pp\in Spec R \mapsto f \pmod{ \pp}\in R/\pp$.

\textbf{Better:}  introduce
$$\xymatrix{
 \bigsqcup\limits_{\pp\in Spec R} R/\pp \ar@/^/[d]^{\pi} & x\in
 R/p\ar@{|->}[d]\\
 SpecR \ar@/^/[u]^{f} & \pi(x)=\pp
}$$
May think of $f$ as a section of $\pi$, i.e. $f:Spec R \rightarrow
\bigcup_{\pp\in Spec R}R/\pp$, s.t.$\pi\circ f = id$.


\begin{definition}[Principal Open]
 If $f\in R$, 
 $$U(f)=X_f=\{\pp\in Spec R \mid f\notin\pp\}$$
  is called a principal open set.
\end{definition}
The complement of a principal open set is closed $Spec  R \backslash U(f)=Z(f)$
is closed.

A rational function $s$ defined on $U(f)$ should be an element of
$R_f=\{a/f^n |a\in R\}$.
$s: U(f)\rightarrow \bigsqcup_{\pp\in U(f) R/\pp}$, $\pp\mapsto s \mod{
\pp R_{\pp}}$

\textbf{Better still:}
$$\xymatrix{
\bigsqcup\limits_{\pp\in Spec R} R_{\pp} \ar@/^/[d]^{\pi}\\
Spec R \ar@/^/[u]^{f}
}$$
$\pi \circ f=id$

Goal is it to define the so called structure sheaf $\OOO_{Spec R}$ on $Spec R$.
Hence we map each open set $U\subset Spec R$ to a ring $\OOO_{Spec R}(U)$ and
we want to map $\OOO_{Spec R}(Spec R)$ to $R$. Furthermore for two open subsets
$U_1\subseteq U_2\subseteq Spec R$ we want to give a restriction map from
$\OOO_{Spec R}(U_2)\rightarrow \OOO_{Spec R}(U_1)$. The following definition copes with
these demands by sending $\OOO_{Spec R}(U(f))\mapsto R_f$ and extending this to
general open subsets of $Spec R$.
\begin{definition}[Structure Sheaf] For $U\subseteq Spec R$ open, set
$$\OOO(U):=\{s: U\rightarrow \bigsqcup_{\pp\in U} R_{\pp}\mid s(\pp)\in R_{\pp} \forall \pp\in U \text{ and }(*)\}, $$
where $(*)$is: For each $\pp\in U$, there is a principle open neighbourhood
$U(f)$ of $\pp$ and an element $s_f\in R_f$ such that $\forall Q\in
U(f), s(Q)=i_Q(s_f)$ in $R_Q$. 
Here $i_Q$ embeds $R_f$ into $R_Q$ which makes
sense as $Q\in U(f)\Rightarrow f\notin Q \Rightarrow R_f\stackrel{i_Q}{\rightarrow} R_Q$.

Let $U_1\subseteq U_2$. We define a restriction map $$\OOO(U_2)\rightarrow
\OOO(U_1), s\mapsto s_{\mid U}.$$ 
So $\OOO$ is a presheaf, the gluing condition holds trivially,
and hence $\OOO$ is a sheaf. We call it the structure sheaf of $Spec R$.

\textcolor{red}{THIS IS LIKE THE WORST FORMULATED DEFINITION. DEFINITELY NEED TO
FIND A NICER WAY TO WRITE THIS DOWN!!}
\end{definition}

\begin{definition}
The pair $(Spec R, \OOO_{Spec R})$ is called an affine scheme.
\end{definition}

\begin{lemma}
\begin{enumerate}
  \item $\OOO_{Spec R}(Spec R)=R$.
  \item If $f\in R$, $\OOO_{Spec R}(U(f))=R_f$.
  \item For $\pp\in Spec R$, the stalk $\OOO_{Spec R, \pp}\cong R_{\pp}$.
\end{enumerate}
\end{lemma}
\begin{definition}[Properties]
\begin{itemize}
  \item Spec R is smooth at $\pp$ if $\OOO_{Spec R, \pp}$ is a regular local
  ring.
  \item Tangent space of $Spec R$ at $\pp$ is $(\pp R_{\pp}/(\pp R_{\pp})^2)^*$
  \item $Spec R$ is normal at $\pp$ if $R_{\pp}$ is integrally closed.
\end{itemize}
\end{definition}

\begin{definition}
A pair $(X,\OOO)$ where $X$ is a topological space and $\OOO$ is a sheaf of
rings on $X$ is called a locally ringed space if $\forall P\in X$, $\OOO_{P}$
is a local ring.
\end{definition}
\begin{Example}
Affine schemes are locally ringed spaces.
\end{Example}

\textbf{Morphisms of locally ringed spaces:}

If $(X,\OOO_X)$ and $(Y,\OOO_Y)$ are locally ringed spaces, a morphism
$(X,\OOO_X)\rightarrow (Y,\OOO_Y)$ is a pair $(\phi, \phi^{\#})$ consisting of
\begin{itemize}
  \item $\phi: X\rightarrow Y$ is continuous map.
  \item $\phi^{\#}: \OOO_Y\rightarrow \phi_*\OOO_X$ is a morphism of sheaves on
  $Y$, i.e.for any open $U\subseteq Y$ we have $\phi^{\#}: \OOO_Y(U)\rightarrow
  \OOO_x(\phi^{-1}(U)))$ compatible with restriction maps, i.e. if $V\subseteq$
$$
\xymatrix{
\OOO_Y(U)\ar[r]^{\phi^{\#}} \ar[d]^{r^{\OOO_Y}_{U,V}} & \OOO_X(\phi^{-1}(U))
\ar[d]^{r^{\OOO_X}_{U,V}}\\
\OOO_Y(U) \ar[r]^{\phi^{\#}(V)} & \OOO_X(\phi^{-1}(U))
}
$$
commutes.
\item For each $P\in X$, the induced map on stalks
$$
\xymatrix{
\phi^{\#}_{\pp}: \OOO_{Y,\phi(\pp)} \ar[dr] \ar[r] & (\phi_* \OOO_X)_{\phi(\pp)}
\ar[d]\\
& \OOO_{X,P}
}$$
is a local homomorphism of local rings (i.e. $(\phi^{\#}_{\pp})^{-1}$ (maximal
ideal)=max ideal))

\end{itemize}
If $\phi: R\rightarrow S$, we would like to know if $\phi$ gives rise to a
morphisms $(Spec S, \OOO_{Spec S})\rightarrow (Spec R, \OOO_{Spec R})$. We do
have a continuous map $\phi^*: Spec S\rightarrow Spec R.$ We need $\phi^{*\#}:
\OOO_{Spec R}\rightarrow \phi_*^* \OOO_{Spec S}$.Take $U=U(f)\subseteq Spec R$,
tjem $(\phi^*)^{-1}(U(f))=U(\phi(f))Spec S$. Need to give:
$\phi^{*\#}(U(f)): R_f=\OOO_{Spec R}(U(f))\rightarrow S_{\phi(f)}=O_{Spec
S}(U(\phi(f))), \frac{a}{f^n}\mapsto \frac{\phi(a)}{\phi(f)^n}$.
\begin{thm}
The above construction gives an equivalence of categories.
$$\text{(Commutative rings with 1)} \stackrel{\sim}{\rightarrow}\text{(Affine
Schemes)}$$
\end{thm}

$$\text{(affine schemes)$\subseteq$ (schemes)$\subseteq$ (locally ringes
spaces)}$$

Commutative algebra is basically local algebraic geometry and this has been
developed by Grothendieck.


